I have designed a menu and I'm using a dictionary for the values. I would like to stay with a dictionary if at all possible. The only problem is that a dictionary automatically shuffles its contents and I need it, quite obviously, to print the menu in the order I want. My code so far looks like this:
menu = {}
menu['1']="Encrypt message"
menu['2']="Decrypt message"
menu['3']="Secure Encrypt Message"
menu['4']="Exit"
while True:
for number, name in menu.items():
print(number+")", name)
selection=input("Please Select:")
Any help would be greatly appreciated.