python语句块注释

来源:互联网 发布:宠物店软件 编辑:程序博客网 时间:2024/06/11 08:06

python注释的三种方法:

1.井号注释单行  #

2.三个单引号或三个双引号注释语句块  " " "

3.井号加两个百分号画出语句块分界线  #%%

"""@author: zhijuan"""#%%def add(x,y):    return x+y #return the sum of x and y#%%'''the mian function'''def main():    a=1    b=2    print(add(a,b))#%%