: On 1 September 2013 22:40, Tim Roberts <t...@probo.com> wrote: > Another altrnative is to use "raw" strings, in which backslashes are not > interpreted: > a = r'E:\Dropbox\jjfsdjjsdklfj\sdfjksdfkjslkj\flute.wav' > a.split(r'\')
Acually, that doesn't work: >>> a = r'E:\Dropbox\jjfsdjjsdklfj\sdfjksdfkjslkj\flute.wav' >>> a.split('\') File "<stdin>", line 1 a.split('\') ^ SyntaxError: EOL while scanning string literal ... because you can't end a raw string with a backslash: http://docs.python.org/3/faq/design.html#why-can-t-raw-strings-r-strings-end-with-a-backslash -[]z. -- http://mail.python.org/mailman/listinfo/python-list