import re SRCSTR = "12a345a67.8"PATN = r"[^\sa,]+"res = re.findall(PATN, SRCSTR) for elem in res: print(elem)
Standard input is empty
12 345 67.8
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!