I have a list of numbers:
list1 = [33, 11, 42, 53, 12, 67, 74, 34, 78, 10, 23]
What I need to do is calculate the total amount of numbers in the list, then divide by 360 to work out portions of a circle. For this example it would be 32. Which I have done below:
def heading():
for heading_loop in range(len(list1)):
heading_deg = (360 / len(list1))
return heading_deg
The problem I have is that I need to have the number (heading_deg) append by the last number everytime it runs throught the loop. E.g.
run 1: 32
run 2: 64
run 3: 96
run 4: 128
etc etc
Any ideas?? At the moment all it does it return 32, 11 times.
Thanks!!