Python interpreter built-in function

Source: Internet
Author: User

A list of the Python interpreter's built-in functions is as follows:

  

001, ABS () to seek absolute value

# !/usr/bin/python if __name__= ="__main__"    :print(ABS ( -100)) #打印100

002, all () returns true if all values in the argument list are True,all functions

# !/usr/bin/python if __name__= ="__main__":    conditions=[True,false    ] Print (All (conditions)) #打印False

003, any () parameter list as long as there is a True,any function will return true

# !/usr/bin/python if __name__= ="__main__":    conditions=[True,false    ] Print (Any (conditions)) #打印True

004. ASCII () returns a printable string, so if the word character has a carriage return, the line is wrapped, and the characters are printed in its intended form.

# !/usr/bin/python # !coding:utf-8 if __name__= ="__main__":    Strings=" " " after adding a carriage return     """    Print (ASCII (strings)) #打印 ' \u540e\u9762\u52a0\u4e00\u4e2a\u56de\u8f66\n '

005, Bin () returns the bits arrangement of the given int parameter

# !/usr/bin/python # !coding:utf-8 if __name__= ="__main__":    Inter=15    print#  Print 0b1111 (binary of **15 is 1111 AH * *)

Python interpreter built-in 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.