I have a list in a file, looks like this
c4a24534,2434b375,e750c718, ....
I have split at \",\" and brought the below list.
x
You can use zip
to separate the list into two collections.
x=[
['c4a2', '4534'],
['2434', 'b375'],
['e750', 'c718']
]
i,q = zip(*x)
print i
print q
Result:
('c4a2', '2434', 'e750')
('4534', 'b375', 'c718')
These are tuples, though. If you really want lists, you would need to convert them.
i,q = map(list, zip(*x))
#or:
i,q = [list(tup) for tup in zip(*x)]
#or:
i,q = zip(*x)
i, q = list(i), list(q)