How do I parse a string to a tuple??
- From: Soren <soren.skou.nielsen@xxxxxxxxx>
- Date: 30 Apr 2007 02:47:32 -0700
Hi!
I have a string that contains some text and newline characters. I want
to parse the string so that the string just before a newline character
goes in as an element in the tuple.
ex:
"text1 \n text2 \n text3 \n text4" --> (text1, text2, text3, text4)
Is there an easy way to do this?
Thanks!,
Soren
.
- Follow-Ups:
- Re: How do I parse a string to a tuple??
- From: 人言落日是天涯,望极天涯不见家
- Re: How do I parse a string to a tuple??
- From: Steven D'Aprano
- Re: How do I parse a string to a tuple??
- From: James Stroud
- Re: How do I parse a string to a tuple??
- Prev by Date: Re: I/O Operations .....
- Next by Date: Re: While we're talking about annoyances
- Previous by thread: anyone has experience on cross-compile python 2.5.1?
- Next by thread: Re: How do I parse a string to a tuple??
- Index(es):