前面加U报错,去掉U之后运行成功
代码如下
print u'''
静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
报错如下
Traceback (most recent call last):
File "index.py", line 8, in
低头思故乡。'''
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-3: ordinal not in range(128)
代码如下
print u'''
静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
报错如下
Traceback (most recent call last):
File "index.py", line 8, in
低头思故乡。'''
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-3: ordinal not in range(128)
2019-04-19
举报