菜鸟的问题
好记性不如烂笔头~。~

1.`""""  """`三引号+__doc__:

# 三引号的使用 + __doc__
def in_fridge():
    """this is a function to see
    fridge has to be a doctionary fir is in the string wanted_food
    """
    try:
        count = fridge[wanted_food]
    except KeyErrot:
        count = 0
    return count
print('{0}'.format(in_fridge.__doc__))

>>>
this is a function to see
    fridge has to be a doctionary fir is in the string wanted_food
View Code

 

posted on 2019-05-20 14:47  ArSang-Blog  阅读(121)  评论(0编辑  收藏  举报