# from functools import reduce # def multiply(x): # return x*x # def add(x): # return x+x # funcs = [multiply, add] # for i in range(5): # values = map(lambda x: x(i),funcs) # print(values) # product = reduce((lambda x,y:x+y),[1,2,3,4]) # print(product) # number_list=range(-1,30) # oushu = filter(lambda x: x>20 , number_list) # print(oushu) class Rectangle(): def __init__(self,a,b): self.a = a self.b = b def __str__(self): return str((self.a) * (self.b)) rect = Rectangle(3,4) print(rect)