efficiency of range() and xrange() in for loops

Georg Brandl g.brandl-nospam at gmx.net
Thu Apr 6 02:06:20 EDT 2006


Alan Morgan wrote:

>>range is giving you a real list, while xrange is giving you an xrange object.
>>Have you tried to slice an xrange object? Or using .append on it?
> 
> No, I hadn't.  I presume these could all be defined.

How would xrange(100).remove(1) work?

Georg



More information about the Python-list mailing list