There are plenty chances you may have landed in a situation where the code is not behaving as you have expected and you may want to check the python version that is running behind the Jupyter notebook. Then following is the code you must have to use to find out the python version.
# see python version in Jupyter notebook
from platform import python_version
The above block of code is going to print the python version in Jupyter notebook.