Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Faster way to do this...

Reply
Thread Tools

Faster way to do this...

 
 
Timo Virkkala
Guest
Posts: n/a
 
      03-03-2005
Harlin Seritt wrote:
> Roy, I like what you showed: nums = [a for a in range(100)] . My
> mistake for not expressing my question as well as I should have. Not
> only am I looking for a way to fill in 100 spots (more or less) in an
> array errrrr... list, but I'd like to be able to do it in intervals of
> 2, 4, 8 etc. as well as other things.


range(2, 100, 4)

How about you fire up the interactive python and try
help(range)



--
Timo Virkkala
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to make pages faster? Terry Olsen ASP .Net 6 08-01-2005 11:26 PM
XSLT is way faster using Java 5 Matt Stephens Java 0 02-06-2005 09:16 PM
Faster way to write binary using fstream?? Jon Hyland C++ 4 10-04-2004 11:55 PM
Is there any faster way than dynamic_cast to find the object run time type? steve C++ 17 09-13-2004 08:19 PM
Any way to force faster modem connection speeds? Carol Haynes Computer Support 9 02-27-2004 08:50 PM



Advertisments