為什么注釋不能用中文
?
"""score = 85
if score>=90:
??? print 'excellent'
elif score>=80:
??? print 'good'
elif score>=60:
??? print 'passed'
else:
??? print 'failedC"""#因為有‘’所以注釋不用"""
為什么運行是錯誤的
?
?
"""score = 85
if score>=90:
??? print 'excellent'
elif score>=80:
??? print 'good'
elif score>=60:
??? print 'passed'
else:
??? print 'failedC"""#因為有‘’所以注釋不用"""
為什么運行是錯誤的
?
2018-10-31
舉報
2018-11-30
你要在開頭加上 #encoding: utf-8 才行 因為中文屬于Unicode
2018-10-31
你換行注釋也許可以