Every example of a list that I've seen involves working with, sorting, etc
pre-populated list.  How can I create a list where the user inputs a string
of numbers and then sorts it?

I've tried:

print "Input list separated by commas"
lst=[raw_input()]
print lst
print len(lst)
lst.sort()
print lst

It appears to accept the input and will print the list but the length of the
list is wrong and it doesn't sort, leading me to believe that it is seeing
the input as 1 large input instead of separate numbers.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to