Thank you Alan, so simple solution! Just show how little I know!
>> You should probably use the csv module instead <<
For now split should be OK, in the future I will try to learn CVS module.
OK I understand, new subject, new post, thanks again
Mario
On 6/8/2014 5:33 PM, Alan Gauld wrote:
Steven,
How about "," for comma?
LOL! I didn't know, now I know :-)
Thank you also for all additional info.
I printed it out!
Here is a list of the escape sequences allowed:
\a BEL (bell)
\b BS (backspace)
\f FF (formfeed)
\n LF (linefeed or newline)
\r CR (carriag
On Sun, Jun 08, 2014 at 12:56:40PM -0600, Mario Py wrote:
> Hi everyone, this is very basic/beginner question.
>
> I'm reading TXT file, two words per line that are separated by TAB:
>
> question, rightAnswer = line.strip().split('\t')
For a simple format like this, that's perfectly acceptable,
On 08/06/14 19:56, Mario Py wrote:
Hi everyone, this is very basic/beginner question.
Hi,
Please don;t reply to an existing message to start a new discussion. It
messes up the threading and makes it harder for people searching the
archives in the future.
I'm reading TXT file, two words pe
Hi everyone, this is very basic/beginner question.
I'm reading TXT file, two words per line that are separated by TAB:
question, rightAnswer = line.strip().split('\t')
I would like to use TXT file that it would be separated by coma.
How do I change that line of code?
I tried these two versions