Python源码中文注释出错

在python源码中使用中文注释,可能会报错,解决方案是: 

# coding=gb2312 #中文注释在这里 print("Hello World!")

或者使用方案:

# -*- coding: gb2312 -*- #中文注释在这里 print("Hello World!")

 

你可能感兴趣的:(Python源码中文注释出错)