Jupyter Notebook freezes when rerunning cell asking for user input

Viewed 341

When I put the following Python code in a Jupyter notebook cell, it asks for the user's input:

var = input('Enter something: ')
print(var)

However, when I rerun the cell while it's asking for input, the code doesn't get rerun, because the kernel was still 'busy' asking for the user's input.

How do I overcome this? It's a little annoying having to interrupt the kernel and rerun the code every time I make a test change.

0 Answers
Related