On Aug 22, 12:12 pm, "++imanshu" <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a reason why two similarly named functions Sorted and > Reversed return different types of data or is it an accident.
You seem to have an interesting notion of "similarly named". name0[-2:] == name1[-2:], perhaps? The two functions (eventually, in the case of "reversed") return data in the order one would expect from their names. >>> x = [1, 3, 5, 2, 4, 6] >>> sorted(x) [1, 2, 3, 4, 5, 6] >>> reversed(x) <listreverseiterator object at 0x00AA5550> >>> list(reversed(x)) [6, 4, 2, 5, 3, 1] >>> -- http://mail.python.org/mailman/listinfo/python-list