Created
December 16, 2016 18:46
-
-
Save amosboldor/0bd0c7d7c5ce827bf33b5ab70edd458e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add_us(numbers, integer): | |
total = '' | |
for num in numbers: | |
total += str(num) | |
return list(str(int(total) + integer)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?