Python3 Tutorial

Python 3.0, commonly known as Python 3000 or Py3k, is a major upgrade over earlier versions. To avoid carrying too much baggage, Python 3.0 was designed without backward compatibility.
Python introduction and installation tutorials are already covered in the Python 2.X tutorial, so they won’t be repeated here.
You can also check Differences between Python 2.x and 3.x to see the differences between the two.
This tutorial focuses on Python 3.x. If you are using Python 2.x, please refer to the Python 2.X tutorial.
Officially announced: Python 2 updates will end on January 1, 2020.
Checking Python Version
Section titled “Checking Python Version”You can check the Python version you are using by running the following command in the command window (Windows: use Win+R to open the cmd run dialog):
The result of the above command is as follows:
You can also enter Python’s interactive programming mode to check the version:
First Python 3.x Program
Section titled “First Python 3.x Program”For most programming languages, the first introductory programming code is “Hello World!”. The following code uses Python to output “Hello World!”:
hello.py file code:
Section titled “hello.py file code:”The common file extension for Python is .py.
You can save the above code in a hello.py file and run the script file using the python command.
The output of the above command is: