Python built-in functions and uses

Source: Internet
Author: User
Python has a number of functions built into it that can be called directly

ABS () take absolute value

ABS (-29)

When calling a function, if the number of incoming arguments is incorrect, a typeerror error is reported, and Python will tell you explicitly that abs () has only one parameter, but gives two parameters

If the number of arguments passed in is correct, the type of the single parameter cannot be accepted by the function, the TypeError error is reported, and an error message is given: STR is the wrong parameter type

Max function, Max can accept any number of arguments and return the largest one

Data type conversions

Python's built-in common functions also include data type conversion functions, such as the Int () function to convert other data types to integers



Python built-in functions and uses

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.