[Tutor] to sort

prasad rao prasadaraon50 at gmail.com
Fri Dec 26 07:21:19 CET 2008


hello       I am trying to sort a list(I know there is a builtin sort
method).

     a=[21,56,35,47,94,12]
      b=[]

   for x in a:
b.append (min(a))
a.remove (min(a))
>>> a
[56, 47, 94]
>>> b
[12, 21, 35]

It is not Compleating .Doing only 3 rounds.Why?
By the way how can I view the builtin code for sort method?

Wish you all Happy Xmass.
                thanks
 Prasad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20081225/26c1a131/attachment.htm>


More information about the Tutor mailing list