def validate checker lambda x-9 if else seqm map lambda checker map in

1
2
3
4
def validate(n):
checker = lambda x: x-9 if x>9 else x
seqm = map(lambda x: checker(x*2),map(int, str(n)))
return not bool(sum(seqm)%10)