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")
posted @ 2019-11-02 15:50  犀利瓜  阅读(397)  评论(0编辑  收藏  举报