Python Hall, the second order of the Hundred-order one temple

Source: Internet
Author: User

Variable:

True Flase 1 < 2 2 > 1 n1 < n2 N1 = N2

In the Write variable, A: The variable is named English letter, underscore, number

B: The left variable name cannot start with a number and cannot be a keyword inside python

numbers are not enclosed in quotation marks, and strings must be enclosed in quotation marks.

use of the IF statement:

If condition:

code block

Else

code block

Usage of import:

Import is used in Python to invoke a Python module, ending with a. py file, chestnuts as follows:

Import time is called when the time is required to pause in print ("") so that no code content processor can handle it, thus occupying more memory space.

#!/usr/bin/python
#-*-Coding:utf-8-*-
Import time
i = 1
While True:
Print (i)
Time.sleep (1)

#停顿1秒后执行下一个
if i = = 5:
Break
i = i + 1

Python Hall, the second order of the Hundred-order one temple

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.