I've only been using Python for a few months and I'm a bit stuck. This is a chunk of a longer code:
while True:
    method=input('''How would you like to analyse your data?
    1 = mean
    2 = quartile
    3 = mode
    4 = range
    5 = variance
    6 = standard deviation
    ''')
    if method == '1':
        mean=sum(theList)/len(theList)
        print('The mean of this data set is '+str(mean)+'.')
        while True:
            moveOn=input('Calculate another measure? Y/N ')
            if moveOn == 'Y' or moveOn == 'y':
                print('Redirecting...')
                time.sleep(1)
                break
            elif moveOn == 'N' or moveOn == 'n':
                print('Thank you for using the PDAP. ')
                break
            else:
                print('Invalid response. ')
The problem is, I need the elif option to break out of the first while loop, but also out of the second. If someone types 'n', I need to program to just finish there and stop completely, but I can't seem to work out how to do that.
 
     
    