how to check python version in ubuntu code example
Example 1: check ubuntu version
lsb_release -a
Example 2: how to find python version
python --version
Example 3: check python version ubuntu
python3 --version
Example 4: python version installed in ubuntu
# check all python version install in ubuntu
$ ls /usr/bin/python* # for path and version
$ whereis python # for path and version
$ which python # for path
$ ls -lach /usr/bin/python
$ for p in $(compgen -c python); do printf "%-16s" $p; $p --version; done