After the program is installed, you can enter the Python programming Tour, this lesson we will write some code, let you get a preliminary understanding of Python programming.
First we open the Python program from the command line:
Python
If the following information appears, you have successfully run Python and entered its interactive mode:
Python 2.6.6 (r266:84292, Jul, 15:22:56 4.4.7 20120313 (Red Hat 4.4.7-11" Help " " Copyright " " credits " or " License " for More information.
Now, you can write some code to do it. For example, we enter print (' Hello ') after >>>, and then enter:
Print ('hello') Hello
If you see the interpreter return Hello, congratulations, you have successfully executed your first line of code. Let's take a look at the meaning of this line of code, print () receives the ' Hello ' string and prints it out.
The first Python program