我正在尝试运行此模块,但看不到它有什么问题。顺便说一句,我对编程和 python 很陌生。
# functions.py
def MM():
return print("""
_______________
| |
| MAIN MENU |
| Save |
| Load |
| Options |
| Exit |
|_______________|""")
MMInput = input("")
if MMInput == "Save".lower :
return "save"
elif MMInput == "Load".lower :
return "load"
elif MMInput == "Options".lower :
return "options"
elif MMInput == "Exit".lower :
return "exit"
运行模块
import functions
Command1 = input("What do you want to do")
if Command1 == "menu".lower:
print("Opening Menu")
functions.MM