guys i m a beginner in python,i just observed one thing that when i generate a list from string using split(' ')[split elements by spaces] than operations(like sort) on that list give messed up results not as expected. plese tell me how i can overcome this problem? here is my code
str=raw_input() #suppose i give "50 100 50" as string
var=str.split(' ') #it splits into [50,100,50]
var.sort() #now sorting command
print "Sorted var is: %r" %var #it gives [100,50,50] instead of [50,50,100]