I wrote a code in Python to print the minimum and maximum value of user input. If I input the number 0 to 15, I would expect max()
to return 15 and min()
to return 0. However, max()
returns 9:
i = (input().split(" "))
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
print(min(i))
# 0
print(max(i))
# 9
Why doesn't max(i)
return 15?