Life is short, I use Python to learn one of my notes---python

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.