import re text = """4 Followers330 Followers23.5k Followers67k Followers25m Followers"""res = [x.split()[0] for x in text.split('\n')]print(res)
Standard input is empty
['4', '330', '23.5k', '67k', '25m']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!