Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
lisai9093 committed Jul 25, 2024
1 parent e7ea28b commit 047736f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yys.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def select_mode():

while True:
try:
index=int(input("选择功能模式:"))
raw=input("选择功能模式:")
index=int(raw)
if index<0:
raise Exception('数字超出范围')
command = mode[index]
Expand Down

0 comments on commit 047736f

Please sign in to comment.