1. python中的注释

python中的注释有两种方式

  1. 通过 # 来标明是注释
  2. 通过字符串来注释,如"这里是注释", """这里是注释"""

举例

age = 10
# 打印年龄
print("he's age is %d"%age)

"name 是字符串"
name = "gelu"
print("%s's age is %d"%(name,age)

"""
hello world是最伟大的语言
python 中def 来定义函数,通过缩进来标识代码块
"""
def hello():
    print("hello world")
原文地址:https://www.cnblogs.com/gelu/p/11782642.html