Review Python BASICS (8)

Source: Internet
Author: User

1. Sort out Python keywords

 #  _ * _ Coding: UTF-8 _*_  And  Del   # Deleting an element in the list or this list applies to dictionaries.  From  Not  While  As  Elif  Global  Or  With  #  Http://www.cnblogs.com/Brogrammer/archive/2012/07/23/2605570.html Assert   #  The assert statement is used to declare that a condition is true. For example, if you are very sure that a list you are using has at least one element, and you want to test this and cause an error when it is not true, the assert statement is an ideal statement applied in this case. When the assert statement fails, an assertionerror is thrown.  Else  If  Pass  Yield   #  Http://developer.51cto.com/art/201301/379132.htm  Break  Except   #  Similar to try... catch statements  Import Print  Class  Exec   #  Exec statements are used to execute Python statements stored in strings or files. For example, we can generateCodeAnd then execute these statements using the exec statement.  In  Raise  Continue  Finally  Is  Return  Def  For  Lambda  Try 

2. Data Type

View code

 
Truefalsenonestringsnumbersfloatslists

3. String output format

View code

 
%D%I%O%U%X%X%E%E%F%F%G%G%C%R%S%

4. Operators

View code

 
+-*** // % <> <=>==! = <>() [] {}@,:.=;+ =-= * =/= // = % = ** =

 

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.