Skip to content

Instantly share code, notes, and snippets.

@amosboldor
Created December 16, 2016 18:46
Show Gist options
  • Save amosboldor/0bd0c7d7c5ce827bf33b5ab70edd458e to your computer and use it in GitHub Desktop.
Save amosboldor/0bd0c7d7c5ce827bf33b5ab70edd458e to your computer and use it in GitHub Desktop.
def add_us(numbers, integer):
total = ''
for num in numbers:
total += str(num)
return list(str(int(total) + integer))
@Bl41r
Copy link

Bl41r commented Dec 17, 2016

Almost got this one. Your method has two main problems: You need to handle zeroes in the beginning, and your function is returning a list of strings, instead of ints. Can you think of a simple way to fix the second problem by changing line 5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment