[Tutor] General design question

Paul Melvin paul at assured-networks.co.uk
Wed Jul 2 10:27:52 CEST 2008


Hi,

 

I am new to python and although have done basic many, many years ago it has
all gone, replaced by rubbish!

 

My question is this:

 

If I have a set of numbers, or strings etc. which have been generated and I
then want to do something with them, for example a sum function call.  Is
the best way to put those items in a list, or similar container, before
applying the function.

 

For example, if I generate some numbers using range the only way I could
easily sum them was to append them to a list and then call the sum function,
if I tried without the list I couldn't sum them at all.

 

I have read a lot of the recommended reading and am now trying to figure out
general code design, if anyone had any pointers/links it would be
appreciated.

 

Regards

 

paul

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080702/4b959906/attachment-0001.htm>


More information about the Tutor mailing list