已采纳回答 / qq_hush_ceklpC
class Animal(): passdog = Animal()cat = Animal()print(dog)print(cat)print(dog == cat)
2021-07-09
from functools import reduce
def f(x,y):
return x*10+y
print(reduce(f,[1,3,5,7,9]))
def f(x,y):
return x*10+y
print(reduce(f,[1,3,5,7,9]))
2021-06-14
def f(x):
return x.capitalize()
item = map(f,['alice', 'BOB', 'CanDY'])
print(item)
return x.capitalize()
item = map(f,['alice', 'BOB', 'CanDY'])
print(item)
2021-06-14