[Tutor] sorting lists

Diana Furr dleigh0 at carolina.rr.com
Tue Nov 9 05:13:26 CET 2004


I have a couple of lists that are made by user input. They will input one thing for the first list and a related thing for the other list. I want the list to be sorted alphabetically and then printed. This is an example of the problem.
After user input 
list1[oranges, apples] 
list2[2,4] 
# The user is saying that they have 2 oranges and 4 apples
If I alphabetize the first list the output looks like 2 apples and 4 oranges.
I guess what I'm asking is how do I connect the lists so that when one is sorted the other list changes too. I hope that makes sense.
Thank you in advance for your help.
Diana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20041108/12930469/attachment.html


More information about the Tutor mailing list