Python built-in functions

Source: Internet
Author: User

Official documents

All () determines whether all elements are ture.

Any () returns ture if only one element is ture.

ASCII () is actually the result of executing the __repr__ within the class of the corresponding object.

Validation methods

Class Winter:  #创建一个类    def __repr__ (self):   #在类里面定义一个__repr__的函数        return "What can I see"   # This function does everything and returns only one text F=winter ()   #建议个class Winter Object A=ascii (f)   #对这个对象执行asciiprint (a)     #打印结果

  

C:\Python\Python35\python.exe d:/winter_py/practice/winshen_python/day3/004_test.py
What can I see

Process finished with exit code 0

The result of the view is the return value of the function.

Python built-in functions

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.