Ad
Code
Diff
  • convert_binary_decimal = lambda number: sum(int(val)*2**power for power, val in enumerate(str(number)[::-1]))
    • def convert_binary_decimal(number):
    • return sum(int(val)*2**power for power, val in enumerate(str(number)[::-1]))
    • convert_binary_decimal = lambda number: sum(int(val)*2**power for power, val in enumerate(str(number)[::-1]))