Brothers Learn python----python function

Source: Internet
Author: User

function of the Python function

Functions are reusable, and code snippets that enable specific functionality are a specific code group structure.

Second, define the function:

2. function format with parameters:

Third, the invocation of the function:

Defining a function simply gives the function a name, specifying the function of the code's structure setting,

If you want to use this function, you can write the name of the function directly or you can execute it through another function.

The following example:

These are some of the basic elements of my function, which are described in detail in other cases of the function.

Brothers Learn python----python function

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.