choice = '' #Initialise choice to blank so will enter loop
print('MAIN MENU') #---
print('-----------') #--
print('1) Encrypt a message') #- Display main menu
print('2) Decrypt a message') #--
print('3) Exit') #---
while choice not in ['1','2','3']:
choice = input('Please choose 1,2 or 3 ')#Get user's choice
if choice == "1":
#encrypt() Call encrypt function
elif choice == '2':
# decrypt() Call decrypt function
else:
sys.exit() #Exit the program
为什么发生这种情况无论我尝试什么缩进我仍然得到错误! 我已经看过其他的答复,但没有人可以帮助 - 我相信这是微不足道的,但我已经试过配置负载但没有工作预期的缩进块 - 让我疯狂
与Pydev的精选文摘使用将有很大的帮助缩进和整体编码! –