解决python print中文的时候乱

2023-01-31 04:01:25 python 中文 解决
  1. python文件开头加编码设置
    #coding=utf-8
  2. 中文字符串开头加u,如
    print(u"两个数的和为:%d"%(a+b))

相关文章