(3) Python Process Control and Function Definition

Source: Internet
Author: User

Sequential Structure

Select Structure

If expression: Elif expression: else:

Loop Structure

While expression: for in

Break continue

Range Len ()

Function Definition def func ():

Function call is a reference call.

In a function, you cannot assign values to global variables (except the global description). The parameters of a function are passed by reference (except values). The default value of a function parameter is only called once. In general, the location parameter is in front of the real parameter, and the keyword name must be the shape parameter name after the keyword parameter. You can use a keyword parameter to call a parameter with or without the default value. The default value of the parameter can be used only once, and will be accumulated in future calls by default. Or you can use the keyword directly.

* Name accepts string sequences ** name accepts all unmatched keyword parameters as function dictionaries

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.