Possible Duplicate:
Split string on whitespace in python
I have a string like so:
['.text 0x1000 0xb51b 0xb600 6.259216 ']
and I would like to split it into this:
[.text, 0x1000, 0xb51b... etc]
So far I've tried: re.split("( )", b) and re.split("[ \t]", b)
but to no avail. I get things like:
.['.text', ' ', '0x1000', ' ', '0xb51b', ' ', '0xb600', ' ', '6.259216', ' ', '']
or some others with even more whitespaces. I know I could just remove the whitespaces from the string but I would much rather just straight up use a RE to split them in the first place.