I have a list: [ "123-12 abc, qwerty", "pol, T. top", "14-89 toy, rap"]
.
I want to output it like this using Regular Expressions:
qwerty abc 123-12
T. top pol
rap toy 14-89
Is there any pythonic way to solve this? Thank you.
I have a list: [ "123-12 abc, qwerty", "pol, T. top", "14-89 toy, rap"]
.
I want to output it like this using Regular Expressions:
qwerty abc 123-12
T. top pol
rap toy 14-89
Is there any pythonic way to solve this? Thank you.
There is no need to use regular expression.Here is a simple solution
l = [ "123-12 abc, qwerty", "pol, T. top", "14-89 toy, rap"]
for i in l:
t = i.split(",")
print(t[1],t[0])