sit*_*lia -1 python if-statement exception
一旦异常消失,我想要一个if语句.它的功能是什么,或者甚至是可能的?
这就是我想要的
try:
save_this_number_file(s)
except:
print("could not find file. Don't forget to add *.txt* to the end of file name.")
if (except):
again = input("Would you like to try again? (y/n) ")
if (again != 'y'):
sys.exit()
Run Code Online (Sandbox Code Playgroud)