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

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to