numbers = [10, 20, 30, 40, 50]
average = sum(numbers) / len(numbers) print("The average is:", average)
in python it is good to do the calculations separately, because it interprets each instruction not compiles.Therefore make the sum separately and divide by the length.