alist = atest.replace('A', '3.').replace('C', '2.').replace('G', '1.').replace(
    'T', '0.').split('.')
anumlist = [int(x) for x in alist if x.isdigit()]
Fast way to convert strings into lists of ints in a Pandas column?