2011-04-02, 12:51 PM
EarthAdept2 Wrote:They come out as both being sorted. I'm not quite understanding what's going on here.
seq.sort() sorts the current sequence. seq.sorted() returns a sorted version of seq without modifying seq itself.
Code:
c = [1,5,6,3,2,10]
c_sorted = c.sorted()
print c
print c_sorted
