+ 1
sys.exit() gives an error in python.Why?
Refer to my code "finite automata" https://code.sololearn.com/c7pc8QKnYmlo/?ref=app the above code accepts a finite automata and accepts the inputs to scan in that FA
1 Odpowiedź
+ 5
That happened because your try statement doesn't have an except part.
So do something like:
import sys
....
try:
#code
except:
sys.exit()