What does `exit` keyword do in Python3 with Jupyter Notebook?
问题 I am currently using Python3 in Jupyter Notebook and I just ran into a keyword exit . What does this keyword do ? with open("some_file.txt") as f: for lines in f: print(lines) exit 回答1: The exit lines in your loop do nothing. Why they do nothing is a bit more complicated than the usual reason exit would do nothing in Python, though. Normally, exit on a line by its own wouldn't exit Python. At most, in interactive mode, it would print a message telling you how to quit Python (message