#(lambda 形参,形参:表达式)(实参,实参)  lambda函数
print((lambda x,y=3:x*y)(8))

def fun(x):
    if x%2:
        return None
    else:
        return x
x=int(input())
print(fun(x))

#filter(形参,[实参,实参,实参,实参'实参'])  filter函数
print(list(filter(None,[0,1,2,3,4,5,6,7,8,9,10,""," ","六",False,[],()])))
print(tuple(filter(None,[0,1,2,3,4,5,6,7,8,9,10,""," ","六",False,[],()])))

def f(u):
    print("Hello,Python!")
    if u%2==0:
        return True
    else:
        return False
print(list(filter(f,[0,12,2,37,56,43,53,77,90])))

#1-100奇数求和
a=0
for i in range(1,101,2):
    a+=i
print(a)

print(sum(list(range(1,101,2))))

#sorted默认为升序排序
print(sorted([2,65,321,124]))

#高于5000的工资
salaries={"Jack":3000,"Alex":6000,"Dannle":4000,"Anne":10000,"Charlie":5100}
print(list(filter(lambda k:salaries[k]>5000,salaries)))