welcome = ('Welcome to ' + a_string + '!')
dq = 'Dataquest'
jn = 'Jupyter Notebook'
py = 'Python'
What I expected to happen:
- Run the first cell
- Run the second cell
- Delete line
py = 'Python' from the first cell
- Run the first cell again
- Run the second cell again
I expected error because
py is not defined anymore.
What actually happened:
There is no error:
'Welcome to Python!'
The last step in the same instruction identifies this.
Restart and Run All.
I am not sure how much of
hidden state concept you have understood, but you can consider it this way, the variable
py is still stored with notebook even after you have commented or deleted the line
py = python. To clear it away you need to click on “Restart and Run All”.
If this is all too complex for you right now, it’s okay, just take as if you are trying to get a clean slate in which the other two variables you will declare again, and the third variable “py” you are deleting it.
hope it helps.
Yeah, thanks. I understand it now.
However, parts 6 and 7 of this instruction still seem to be a bit confusing for me.