Built-in functions are those Python Functions which are built into the language itself, meaning Python Core Developers have designed/implemented these functions into language. These functions can be really useful.
Below is a table listing all of Built-in Functions in Python with examples for each one.
Built-in Function | Description |
---|---|
abs() | Returns absolute value of number |
all() | Only returns true if all elements inside an iterable object are true |
any() | Returns true if any element inside an iterable object is true |
ascii() | Returns a readable version of an object |
bin() | Returns binary version of number |
bool() | Returns boolean valued of object |
bytearray() | Returns array of bytes |
bytes() | Return a bytes object |
callable() | Returns true only if specified object is callable, false otherwise |
chr() | Returns a character from specified unicode |
classmethod() | Converts a method into class method |
compile() | Returns a Python Code Object |
complex() | Takes in two numbers and return a complex number |
delattr() | Delete specified attribute from an object |
dict() | Returns a Python Dictionary |
dir() | Return a list of specified object’s properties and methods |
divmod() | Returns quotient and remainder of dividing two numbers like num1/num2 |
enumerate() | Takes in a Python Collection and return an enumerate object |
eval() | Evaluates/Executes an expression |
exec() | Executes the specified object |
filter() | Using a filter function – exclude items from an iterable object |
float() | Returns floating point number |
format() | Returns formatted form of some value passed in it |
frozenset() | Returns a Frozenset object |
getattr() | Returns value of specified attribute |
globals() | Return global symbol table as dictionary |
hasattr() | Returns True if and only if specified object have specified attribute |
hash() | Returns hash value of specified object |
help() | Executes help function |
hex() | Converts a number to equivalent hexadecimal value |
id() | Returns id of an object |
input() | Takes in User Input |
int() | Converts passed number to integer and return it |
isinstance() | Returns True if specified object is an instance of specified class |
issubclass() | Returns True if specified class is an instance of some other specified class |
iter() | Returns an iterable object in Python |
len() | Returns length of object |
list() | Returns a Python list |
locals() | Returns a Python Dictionary containing current local symbol table |
map() | Returns an iterator with some specified function applied to each item |
max() | Returns largest item in an iterable object |
memoryview() | Returns a memory view object |
min() | Returns smallest item inside an iterable object |
next() | Returns next item in an iterable |
object() | Returns a new Python Object |
open() | Opens file first and then returns a File Object |
oct() | Converts number into its equivalent octal form |
ord() | Convert an integer representing the Unicode of the specified character |
pow() | Returns value of x to the power of y |
print() | Prints some value out |
property() | Gets, Sets, or deletes property of some specified object |
range() | Returns a sequence of numbers starting from zero and incrementing by 1 each time |
repr() | Returns a version of an object which is Human Readable |
reversed() | Return a reversed iterator version of iterator being passed in |
round() | Does Mathematical Rounding of a number |
set() | Returns a Set Object |
setattr() | Set some attribute of an object |
sorted() | Sort the sequence object type in Python |
@staticmethod() | Converts a method into static method |
slice() | Return some slice of an object |
str() | Returns a Python String Object |
sum() | Adds together items in an iterator and returns resulted value |
super() | Returns an object which represents parent class |
tuple() | Returns a Tuple Python Object |
vars() | Returns __dict__ property of object |
zip() | Make an iterator that aggregates elements from each of the iterables. |
More about Python Programming Language –
No Comments
Leave a comment Cancel