xrange questioin

Chris Liechti cliechti at gmx.net
Sat Jul 27 11:16:52 EDT 2002


Uwe Schmitt <uwe.schmitt at procoders.net> wrote in 
news:ahubfn$hj80t$1 at hades.rz.uni-sb.de:
> as xrange() comsumes less memory than range() I ask why
> I should use range() at all.... is there any benifit 
> from using range() ???

with range you get a true list which you can manipulate, sort, reverse, etc 
... you can't do that with xrange.

chris

-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list