0
list = []

for i in range(5):
    value = input()
    list.append(value)


print(list)
print(max(list))

So the problem is that if input: 11, 12, 13, 14, 15 it does print 15

but if i input: 11, 12, 13, 9, 14 it prints 9, problem is that when i input number lower than 10 it always does print the highest number that is lower than 10

Adanos
  • 3
  • 2
  • Because you're comparing *strings*. – deceze May 10 '21 at 11:25
  • 4
    You are comparing numeric strings, not actual numbers. The string `"2"` counts as higher than `"11"` just like `"B"` comes after `"AA"` in alphabetical order. – Blckknght May 10 '21 at 11:26

0 Answers0