The road to wudao-the middle of the five-day refining phase, the road to five-day

Source: Internet
Author: User

The road to wudao-the middle of the five-day refining phase, the road to five-day

High-order function: the function itself is passed to another function as a parameter, and a function is returned after running.

Recursion: other functions can be called in a function. The call itself is a recursive function (not efficient). 1. specify the function end conditions. The calculation workload and problem scale of each call should be reduced, and the number of calls should not be too large (python 999 times by default, resulting in stack overflow)

 

Decorator (itself a function): adds some functions to the function (without modifying the call method and code of the function), and the function itself does not change much and cannot be affected.

 

The decorator has been called before the function is called. @ Decorator: place it in the function to be decorated. Upload parameters!

 

(Laziness is the source of Sin)

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.