Lpthw stupid way to learn Python 37 python keywords/keywords introduction

Source: Internet
Author: User

This chapter provides a brief description of the various keywords:

and:[Boolean operation] and

Del: Delete variable (function, Class)

From: read from a library or file

not:[Boolean operation] non-

While:while-loop keyword, followed by loop condition

As: typically used with the import class overlay, which represents loading a module with some other name.

Part of the Elif:if branch control.

Global: Declares a variable to be a globally variable.

or:[Boolean operation] or

With: Performs an action, usually in conjunction with AS, and after the action is completed, it must be closed or exited.

Assert: Declares an error. Using the method, Assert is followed by a Boolean operation.

Else:if part of the branch control that represents the condition when other conditions are not established.

If:if Control Branch

Pass: Do not do anything, usually is the seat use.

Yield: iterator generator, I don't understand either. Go back and have a pits.

Break: A method of stopping a loop that is used in a while,for loop.

Except:try the method of an exception capture for the Debug method.

Import: Introduce module.

Print: Output

Class: Declaring a Category

EXEC: Re-executing the following, exec ("Print ' Hello World '), can be refactored as a command. For example, the obtained variable as a variable.

In: Checks whether an element is in a list, a tuple, or a dictionary, and if the check is a dictionary, it is usually checked for key.

Raise: Throws a custom exception.

Continue: Continue the loop without the next steps.

Finally:try the final execution when debugging.

IS: The ID that determines whether two objects are consistent.

Return: Typically used for returns in the body of a function, which can be captured by assignment.

def: defines a function.

For:for-loop

Lambda: is a method of writing an expression whose subject is an expression.

Try: attempt.

Lpthw stupid way to learn Python 37 python keywords/keywords introduction

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.