Beginner Python Help

Alan Gabriel alanunny at gmail.com
Fri Mar 18 03:04:55 EDT 2016


Hey there,

I just started out python and I was doing a activity where im trying to find the max and min of a list of numbers i inputted.

This is my code..

num=input("Enter list of numbers")
list1=(num.split())

maxim= (max(list1))
minim= (min(list1))

print(minim, maxim)



So the problem is that when I enter numbers with an uneven amount of digits (e.g. I enter 400 20 36 85 100) I do not get 400 as the maximum nor 20 as the minimum. What have I done wrong in the code?

Thanks for the help



More information about the Python-list mailing list