Latest web development tutorials

Python3 Tutorial


Version 3.0 of Python, often referred to as Python 3000, or simply Py3k. With respect to an earlier version of Python, this is a major upgrade. In order not to bring too much burden, Python 3.0 in the design does not consider backwards compatibility.

Python Introduction and installation tutorial we Python 2.X version of the tutorial has been introduced, and not repeat them here.

You can also click Python2.x with version 3 .x difference to see the difference.

This tutorial is for Python 3.x version of the study, if you are using Python 2.x version please move to Python 2.X version of the tutorial .

See python version

We can use the following command to see the version of Python that we use:

python -V

Results of the above command as follows:

Python 3.3.2

You can also enter Python's interactive mode, view version:

Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

The first program Python3.x

For most programming languages, first introductory programming code is "Hello World!", Use the following code to Python output "Hello World!":

Examples (Python 3.0+)

#! / Usr / bin / python
print ( "Hello, World!");

Running instance »

You can save the code above in file and execute the script file using python command.

$ python3

The above command output is:

Hello, World!