I have a list of product codes in a text file, on each like is the product code that looks like:
abcd2343 abw34324 abc3243-23A
>
import re
m = re.match(r"(?P[a-zA-Z]+)(?P.+)$",input)
m.group('letters')
m.group('the_rest')
This covers your corner case of abc3243-23A and will output abc for the letters group and 3243-23A for the_rest
Since you said they are all on individual lines you'll obviously need to put a line at a time in input