Random "None" appears, no clue why
Hi, I've defined a function that adds up all the numbers in a list and gives you the total. Works like a charm, but each time I run it I also get "None" on the line below. Does anyone know what's causing this? Here's the definition: def listTotal(listname): f=0 total=0 while 1==1: assert(listname[f]==float(listname[f])),"Your list should only contain numbers!" total = total +listname[f] f=f+1 if f == len(listname): print (total) break Thanks in advance!