Last active
July 17, 2020 07:56
-
-
Save Victoria-Hodder/f6b34fc08e8a0bb69794f94b8beb35ec 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
list1 = [-6, -91, 1011, -100, 84, -22, 0, 1, 473] | |
def solution(A): | |
answer = [num for num in A if num in range(-9,10)] | |
return max(answer) | |
print(solution(list1)) |
You're right, thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nit: range(-10, 10) goes from -10 to 9, I think the condition of a single digit should start in -9