check ipython version code example
Example 1: get python version jupyter
from platform import python_version
print(python_version())
Example 2: get python version in code
import platform
print(platform.python_version())
from platform import python_version
print(python_version())
import platform
print(platform.python_version())