Parse variable into variables >Re: Apology

Courageous jkraska at san.rr.com
Sun Feb 24 21:33:06 EST 2002


>I can read a line from a file but then I want to parse the line into a set
>of variables. How do I do the parse?

>>> s = "a,b,c,d"
>>> tple = s.split(",")
>>> tple
['a', 'b', 'c', 'd']
>>> 

For more complex parsing questions, you'll have to ask more precise
questions.

C//




More information about the Python-list mailing list