I tried writing a program that reads numbers using a loop, evaluates the total numbers, prints it and stops when you type done using try and except.
initiator = True
myList = []
while initiator:
    try:
        userIn = int(input('Enter any number >>  '))
        myList.append(userIn)
        print(myList)
    except ValueError:
        if str(userIn):
            if userIn == 'done':
                pass
            average = eval(myList)
            print(average)
            initiator = False
        else:
            print('Wrong input!\nPlease try again')
            continue
 
     
    