我正在尝试使用“python”构建一个非 GUI 应用程序,但由于某种原因,我的“main_menu()”函数没有返回我需要的变量
import pandas as pd
#list for containing telephone number
telephone = []
#list containing contact name
contact_name=[]
def main_menu():
intro = """ ----------------------WElCOME to MyPhone-----------------------
To select the task please type the number corrosponding to it
1)Add New Number
2)Remove Contact
3)Access old contact
----> """
main = int(input(intro))
return main
main_menu()
def clean():
print("--------------------------------------------------------------------------------------")
if main ==1:
def add_number():
clean()
try:
print("How many number(s) you want to add. Remeber if you don't want to add any number just click enter",end="")
number = int(input("----->"))
for i in number:
c_n = int(input("Name -->"))
t_n = int(input("Number-->"))
contact_name.append(c_n)
telephone.append(t_n)
else:
print("Contacts are Saved!👍")
except SyntaxError:
main_menu()
交互式爱情
有只小跳蛙
开心每一天1111
回首忆惘然
尚方宝剑之说
相关分类