问题描述
请帮助!我被卡住了无法在任何地方找到解决方案。
我试图通过 input()调用在每个依次执行的函数中执行一堆函数。
直到满足当前功能条件,才调用下一个功能。而且每个功能都会根据用户的输入执行某些操作。
我在每个函数中都有一个变量 key ,对该函数执行操作。 随时可以通过用户输入来更改此 key 的值。发生这种情况时,我想确认 key 中的更改,运行上一个功能,然后从那里继续。
#if the user changes key via input during func3,#i want python to restart from func2,do func3 again and continue to func4.
#if the user changes key via input during func4,#i want python to restart from func3,do func4 again and continue to func5 and so on.
func1()
func2()
func3() --> input: change key
func4()
func5()
我尝试使用while循环和if-then语句,但是两者均无法传递。
解决这个问题的最佳方法是什么?请告诉我。感谢Avance!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)