d
is a string list where each item is composed of two parts (connected by a dot). I want to extract the parts before and after the dot for each string item.
Here is how I did it.
d = ['a1.b1', 'a2.b2', 'a3.b3']
b = [c.split('.')[0] for c in d]
a = [c.split('.')[1] for c in d]
But I guess there is some more pythonic way?