1list = input('Input a list of numbers separated by comma then space:\n ')
2try:
3 list = list.split(', ')
4 sum = 0
5
6 for number in list:
7 sum = int(number) + sum
8
9 avg = sum / len(list)
10 print('The average of the numbers you entered is: ', avg)
11except ValueError:
12 print('Please enter a list of number separated by a comma and space only')