Probably you are looking for something like this
>>> str1 = """0.35 23.8
0.39 23.7
0.43 23.6
0.47 23.4
0.49 23.1
0.51 22.8
0.53 22.4
0.55 21.6"""
>>> zip(*(e.split() for e in str1.splitlines()))
[('0.35', '0.39', '0.43', '0.47', '0.49', '0.51', '0.53', '0.55'), ('23.8', '23.7', '23.6', '23.4', '23.1', '22.8', '22.4', '21.6')]
You can easily extend the above solution to cater to any type of iterables including file
>>> with open("test1.txt") as fin:
print zip(*(e.split() for e in fin))
[('0.35', '0.39', '0.43', '0.47', '0.49', '0.51', '0.53', '0.55'), ('23.8', '23.7', '23.6', '23.4', '23.1', '22.8', '22.4', '21.6')]
Instead of strings if you want the numbers as floats, you need to pass it through the float function possibly by map
>>> zip(*(map(float, e.split()) for e in str1.splitlines()))
[(0.35, 0.39, 0.43, 0.47, 0.49, 0.51, 0.53, 0.55), (23.8, 23.7, 23.6, 23.4, 23.1, 22.8, 22.4, 21.6)]
And finally to unpack it to two separate lists
>>> from itertools import izip
>>> column_tuples = izip(*(map(float, e.split()) for e in str1.splitlines()))
>>> list1, list2 = map(list, column_tuples)
>>> list1
[0.35, 0.39, 0.43, 0.47, 0.49, 0.51, 0.53, 0.55]
>>> list2
[23.8, 23.7, 23.6, 23.4, 23.1, 22.8, 22.4, 21.6]
So how it works
zip takes a list of iterables and returns a list of pair wise tuple for each iterator. itertools.izip is similar but instead of returning a list of pairwise tuples, it returns an iterator of pairwise tuples. This would be more memory friendly
map applied a function to each element of the iterator. So map(float, e.split) would convert the strings to floats. Note an alternate way of representing maps is through LC or generator expression
Finally str.splitlines converts the newline separated string to a list of individual lines.