On 14/09/2010 18.35, Roelof Wobben wrote:
...
It was not confusing when I read your explanation.
Still im grazy wht with you and Joel the strip works and with me I get errors.

But how can I use the triple quotes when reading a textf-file ?
Very easy: YOU DON'T NEED TO USE ANY QUOTES.
All the quoting stuff is ONLY needed for literals, that is for those strings you directly write in a program. For example:

MyString = """ these are my favourite quoting characters: "'` """ # here you need to avoid ambiguities, because quoting chars are also used to start and end the string.
You could obtain EXACTLY the same string with backslash-quoting:

YourString = ' these are my favourite quoting characters: "\'` ' # here I had to quote the single-quote char

HerString = " these are my favourite quoting characters: \"'` " # and here the double quote had to be quoted by backslash

But when you DON'T write the string yourself, you don't need any quoting:
ThisString = MyString + YourString + HerString  # no quoting required
ThatString = file.read() # again, NO QUOTING REQUIRED.

Roelof
Francesco
Nessun virus nel messaggio in uscita.
Controllato da AVG - www.avg.com
Versione: 9.0.851 / Database dei virus: 271.1.1/3132 -  Data di rilascio: 
09/13/10 08:35:00
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to