Answer the question
In order to leave comments, you need to log in
How can python code be shortened?
def command_check():
global is_on
if command == "view":
view()
is_on = False
elif command == "viewAll":
viewAll()
is_on = False
elif command == "num":
num()
is_on = False
elif command == "add":
add()
is_on = False
elif command == "change":
change()
is_on = False
elif command == "del":
delet()
is_on = False
elif command == "search":
search()
is_on = False
elif command == "exit":
exit()
else:
print("Ошибка. Несуществующая команда.")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question