Python Basic Grammar This article is written by the baby himself Oh, hum, without consent, not reproduced, a little bit ... The first
the baby version is Python2.7, environment Configuration What, on-line tutorial Super DA, Baby here is not more talk about, and oh, baby with the IDE is pycharm, like the little baby can download it yourself Oh
Well, the baby will not talk nonsense, first write a programmer's theorem-----helloworld.py
put a code on it, hey hehe.
Print "Hello,world"//print is the output function of Python
haha haha, have not been moved to, there is no mistake, you have not read wrong, this is Python, a line of code can output "Hello,world", this benefit with its interpreter, the interpreter does not detect the main function, will add itself
The shell of the previous main function, and then Python knows it. So, let's get to know the definition variables.
For example: We first define a variable name called next door Heco (gbag)
# -*-coding:utf-8-*-
#因为下面要输出中文, in order to avoid garbled, to add this sentence oh gbag=" next door a dog " print gbag
la La la, is not surprised again, we do not have to declare what type of variable, you can directly define the variable, is not very convenient, this is the interpreter of the credit Oh
Ah ah, hungry, go to dinner first, continue tomorrow, Bye
Life is short, I use Python to learn one of my notes---python