November 19th, 2004, 10:26 AM
i am new in python enviromnet and i wonder if there exist any
' high level ' command to find columns separated by blank delimeters in an text document read by python, like it exists in awk in Unix for example, except the old-fashioned and low level use of 'for' command to determine that.
thanks in advance for any help,
November 19th, 2004, 02:00 PM
Python does not do it automatically like awk does, but you can do it yourself using the string split() method:
Dave - The Developers' Coach
>>> s = " a string with spaces in it... "
['a', 'string', 'with', 'spaces', 'in', 'it...']