You can use a dictionary consisting of each question with the printed reply, for example:
menu = {'Version': '1.2.2', 'Credit': 'Xendos6 2/22/19', 'Info': 'Some information'}
print('\033[1;34;40m============')
for k in menu.keys():
print('\033[1;39;40m', k)
answer = raw_input()
if answer in menu:
print('\033[1;39;39m', menu[answer])
else:
print("Invalid answer:", answer)
This makes the menu much easier to add items to. If the code to execute is more complex than a simple text string then the action can be placed in a function, one for each menu item, and the function name used as the value. The function is then called as menu[answer]()
.
EDIT:
It now appears that the OP needs a loop. Here is an example that removes each entry from the menu as it is chosen:
menu = {'Version': '1.2.2', 'Credit': 'Xendos6 2/22/19', 'Info': 'Some information'}
while menu:
print('\033[1;34;40m============')
for k in menu.keys():
print('\033[1;39;40m', k)
answer = raw_input()
if answer in menu:
print('\033[1;39;39m', menu[answer])
del(menu[answer])
else:
print("Invalid answer:", answer)
This deletes the key when an item is chosen. The loop continues while menu
has data items in it - while menu:
will be false when menu
is empty.