Python Built-ins Functions

Python has the following built-in functions available at the global scope.


Abs

For built-in types int and float, abs(x) returns the absolute value.

For the built-in type complex, abs(x) returns the magnitude.

For any other object implementing the dunder method __abs__(), that is called.


AIter


All


Any


ANext


Ascii


Bin


Bool


Breakpoint


ByteArray


Bytes


Callable


Chr


ClassMethod


Compile


Complex


DelAttr


Dict


Dir


DivMod


Enumerate


Eval


Exec


Filter

---

Float

For numeric types including int, float(x) returns x converted to an float.

float() also accepts the strings "nan" for not a number (NaN), and any of "inf", "+inf", and "-inf" for positive or negative infinity.


Format


FrozenSet


GetAttr


Globals


HasAttr


Hash


Help


Hex


Id


Input


Int

For numeric types including float, int(x) returns x converted to an int.

IsInstance


IsSubclass


Iter


Len


List


Locals


Map


Max


MemoryView


Min


Next


Object


Oct


Open


Ord


Pow


Print


Property


Range


Repr


Reversed


Round


Set


SetAttr


Slice


Sorted


StaticMethod


Str


Sum


Super


Tuple


Type


Vars


Zip


__Import__


CategoryRicottone

Python/Builtins/Functions (last edited 2023-04-11 17:34:33 by DominicRicottone)