[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hi am new to python

On 9/9/2015 3:35 PM, Denis McMahon wrote:
> On Tue, 08 Sep 2015 17:44:26 -0500, Nassim Gannoun wrote:
>> My question is in a while loop; how do l sum all the numbers in the
>> given list (list_a)?
> You don't normally use a while loop or a counter to iterate over a list.
> Such a question should only be used as a precursor to discussing better
> methods of achieving the required result.

As I understand it, the OP was given the homework assignment to sum up a 
list of numbers using while.  Too bad he didn't also specify using 
binary operators along with while.  :)