Calls to Python functions

Source: Internet
Author: User

First, call the procedure:
1 Find First Name
2 calling code by name
  
The return value of a function has several ways:
0->none (default)
1-> returns 1 values
More than one tuple

Return value Note: Return value does not have a type limit
1. No return: Return none, equivalent to return none
2. Return a value: Returns the value
3. Return Val1,val2,val3: Return (VAL1,VAL2,VAL3)

Three, three forms of function call
1 Statement form: foo ()
2 expression form: 3*len (' Hello ')
4 parameters for another function: Range (len (' Hello '))
# statement Form Res # form of an expression # Res1=my_max (ON) # Res2=my_max (res1,3) Res2 # a function call can be used as a parameter to another function Print (Res2)

Calls to Python functions

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.