Liste des Groupes | Revenir à cl python |
"Michael F. Stemper" <michael.stemper@gmail.com> wrote or quoted:For now, I'll use the "r" in a cargo-cult fashion, until I decide which>
syntax I prefer. (Is there any reason that one or the other is preferable?)
I'd totally go with the r-style notation!
>
It's got one bummer though - you can't end such a string literal with
a backslash. But hey, no biggie, you could use one of those notations:
>
main.py
>
path = r'C:\Windows\example' + '\'
>
print( path )
path = r'''
C:\Windows\example\
'''.strip()
>
print( path )
>
stdout
>
C:\Windows\example\
C:\Windows\example\
>
.
Les messages affichés proviennent d'usenet.