import time
person_list = ["chb", "wmq", "xxy", "lyp", "wzq"]


def ask_way(person_list):
print("-" * 60)
if len(person_list)== 0 :
return"no one can help you"
person=person_list.pop(0)
if person=="wzq":
return" %s :the way is in my heart." % person
print("[%s],where is the way to MJY?" %person)
print("%s: I don't know ,please ask the others such as %s"%(person,person_list))
time.sleep(3)
res=ask_way(person_list)
return res
res=ask_way(person_list)
匿名函数

def calc(n):
return n**n
print(calc(10))


calc = lambda n:n**n
print(calc(10))

posted on 2020-06-03 23:41  质料  阅读(109)  评论(0)    收藏  举报