def tomtoCm(add):
assert add > 0
return add * 2.54
numbers = [4, 1, 20]
def numbersToCm(numbers):
for i in numbers:
convert = tomtoCm(numbers[0,1,2])
print(convert)
numbersToCm(numbers)
I am struggling to * 2.54 to all my numbers in my list. I have tried using len and range, but I can't seem to do it quite right. If I for example write [0] the program prints out 10.16 three times. It won't iterate through my whole list
tomtoCm(numbers[0,1,2])?