Why is that python 3.6 everywhere written?

I used to see the above line everywhere. Didn’t know why is it like that? I’m using powershell, is it fine? I didn’t seen anywhere written like that. Nor I have seen written Ex.14(or any other like that) anywhere while coding?
I’m really confused! :confused:

Hello @Dash_Ashutosh9876543

3.6 is a version of python.
You dont have to write it in code.

The only time you would have to write “python3.6” is when you want just that very version to run your code.
If you just type:

python your_file.py

python 2.7 (if it is installed on your pc) will run the code.

If you type python --version you will see which version you have.
This will run your code if you type:

python3 your_file.py

I hope that will clearify a little about python3.6

What @ulfen69 says is correct, but it might help to know why.

On windows you can just type python into powershell to run your scripts:

python ex1.py

Some other computers (operating systems) were already using an older version of python so when the new python 3 came out they were in trouble. To differentiate between their old python and new python 3 they created a different program and you type:

python3 ex1.py

But sometimes it’s even more complex and you have to say:

python3.6 ex1.py

Or, python3.7 or python3.8. If you don’t know what version of python you’re running type --version after it:

python --version 
python3 --version

It will print out what version. In the book I put “python3.6” but that just means “whatever you have to do to run the right python (3.6 or greater).” Any time you see me type python3.6 you type python and it should work.

A free service run by Zed A. Shaw for learncodethehardway.org.