Ryf*_*lex 3 python unicode if-statement python-2.7
我有以下行导致我的问题:
if "Total £" in studentfees:
收益:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa3 in position 4: ordinal not in range(128)
我怎么能绕过这个?
提前谢谢 - Hyflex
您可以将以下内容添加到文件中:
# -*- coding: utf-8 -*-
Run Code Online (Sandbox Code Playgroud)
也:
if u"Total £" in studentfees:
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
575 次 |
| 最近记录: |