(unicode error) 'unicodeescape' codec can't decode bytes - string with '\u'

后端 未结 4 791
一个人的身影
一个人的身影 2020-12-31 00:00

Writing my code for Python 2.6, but with Python 3 in mind, I thought it was a good idea to put

from __future__ import unicode_literals

at t

4条回答
  •  囚心锁ツ
    2020-12-31 00:37

    When you're writing string literals which contain backslashes, such as paths (on Windows) or regexes, use raw strings. That's what they're for.

提交回复
热议问题