python2.x默认不支持中文输出,需要在py的开头添加
#coding: utf-8
在pycharm里面,选项,editor,file and code templates,选择python script,改成下面的即可。
#coding: utf-8 def run(): print("hello") if __name__ == "__main__": run()
python2.x默认不支持中文输出,需要在py的开头添加
#coding: utf-8
在pycharm里面,选项,editor,file and code templates,选择python script,改成下面的即可。
#coding: utf-8 def run(): print("hello") if __name__ == "__main__": run()
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。