[Tutor] sorting / outputting varibales

ted b phpmoonlighter at yahoo.com
Thu Nov 1 19:39:17 CET 2007

If i input the following in python:
   var1 = 7
   var2 = 9
   var3 = 5
   args = [var1, var2, var3]

then if if type:


the output is

   [5, 7, 9]

but i want the output to be

   [var3, var1, var2]

is there a function that will output the variable
names in the order they have been sorted instead of
the variable contents themselves?

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Tutor mailing list