Faster way to do this...

Harlin Seritt harlinseritt at yahoo.com
Tue Mar 1 07:21:31 EST 2005


I've got the following code:

nums = range(0)
for a in range(100):
   nums.append(a)

Is there a better way to have num initialized to a list of 100
consecutive int values?

Thanks,

Harlin




More information about the Python-list mailing list