dic = {"1": register, "2": login, "3": transfer, "4": withdraw} # 建议采用字典
def main():
while True:
print("""
1.注册
2.登录
3.转账
4.提现""")
res = input("请选择功能:").strip()
if res in dic:
dic[res]()
else:
print("输入有误!")
转载于:https://www.cnblogs.com/tangda/p/10271842.html
本文介绍了一个使用Python字典实现的简单登录系统,包括注册、登录、转账和提现等功能。通过字典来存储用户信息,实现不同功能的选择和调用。
&spm=1001.2101.3001.5002&articleId=102201710&d=1&t=3&u=28b3f489c74f4b87a51698c3acdba5c1)
23万+

被折叠的 条评论
为什么被折叠?



