Exclusive Choices

[Back] <- - + - -> [Next]

Another elif can be used to test for option 'c'.
All three tests will be applied if 'c' is entered.
But only the first test is applied if 'a' is entered.
# previous code
if option == 'a':
    print 'You selected "a"'
elif option == 'b':
    print 'You selected "b"'
elif option == 'c':
    print 'You selected "c"'

Running the code produces this output:
a AAA
b BBB
c CCC

Enter your choice: b
You selected "b"
   
The menu can now recognise
'a', 'b' or 'c' and respond
with an appropriate message.