Ad
  • Default User Avatar

    You shoudn't use lambdas inside map/filter/reduce: a list comprehension is always recommended when you don't already have a function.
    If you really want to use map, then use dict.get

    bits = '000'.join(map(Morse.alpha.get, message))