Ad
Code
Diff
  • is_equal=lambda a,b:("no","yes")[a==b]
    • def is_equal(a, b):
    • return ("no", "yes")[int(a == b)]
    • is_equal=lambda a,b:("no","yes")[a==b]
Fundamentals
Strings
Code
Diff
  • digest=lambda s:' '.join([*s])
    • def digest(food):
    • return " ".join(food)
    • digest=lambda s:' '.join([*s])
Fundamentals
Arrays
Strings
Code
Diff
  • find_trex=lambda a:'T'in''.join(a)
    • find_trex = lambda lst:'Tyrannosaurus' in lst
    • find_trex=lambda a:'T'in''.join(a)
Code
Diff
  • clean=lambda s:__import__("re").sub("[0-9]","",s)
    • clean = lambda s: ''.join(x for x in s if not x.isdigit())
    • clean=lambda s:__import__("re").sub("[0-9]","",s)
Code
Diff
  • add=lambda*_:sum(_)
    • add= lambda *x:sum(x)
    • add=lambda*_:sum(_)