I installed python 3.8.1 on Ubuntu but I do not understand how I access it .. When I type IDLE for using python it opens with python 2.7 (which came pre-installed) .. Also if you could tell me how to install idle for python 3.8.1 .. I hope it is the right question
IDLE for Python 3.x is called idle in Ubuntu 18.04 and later, and it depends on Debian's default Python 3 version. To install idle in Ubuntu 18.04 and later open the terminal and type:
sudo apt install idle
To install IDLE for Python 3.x in Ubuntu 16.04 open the terminal and type:
sudo apt install idle3
When you install the idle package in Ubuntu 18.04 it installs the following three icons.
The icon marked by the mouse cursor in the screenshot opens IDLE for Python 3.x and so does the IDLE icon. The second icon in the screenshot opens IDLE for Python 2.x. As you can see it's not apparent which icon opens IDLE using which Python version, but clicking the IDLE icon in Ubuntu 18.04 and later will open IDLE for Python 3.x.