标签:print please def ase list ret art imp lis
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))
标签:print please def ase list ret art imp lis
原文地址:https://www.cnblogs.com/chb420/p/13040854.html