Python2中写中文要加:# -*- coding:utf-8 -*- ,否则会报Non-ASCII错误,Python3不需要。例:# -*- coding:utf-8 -*-name = "你好,世界"print(name)