69 Python Built-in Functions with Examples

Spread the love

Python has 69 built-in functions to make it easy programming. No need to write code again for these scenarios.

Here are the list of functions

S.no Built-in Functions Function Description
1 __import__() This function is used to import modules
2 abs() This function returns absolute value if it’s integer or float number , if it’s complex number it returns magnitude
3 all() This function returns True if all items in an iterable object are true
4 any() This function returns True if any item in an iterable object is true
5 ascii() The function returns a readable version of any object like Strings, Tuples, Lists, etc and It will replace any non-ascii characters with escape characters
6 bin() This function returns binary value of number
7 bool() This function returns true if the value is there and it returns false if the value is zero or none
8 breakpoint() This function drops you into the debugger
9 bytearray() This function returns an array of objects
10 bytes() This function returns bytes object
11 callable() This function returns if specific object is callable otherwise it will return False
12 chr() This function returns a character from specified character code
13 classmethod() This function converts a method to classmethod
14 compile() This function will compile sourse into code and Code objects can be executed by exec() or eval()
15 complex() This function returns complex value with real and imaginary values
16 delattr() This function deletes the named attribute and provides an object allows it
17 dict() This function returns a dictionary
18 dir() This function returns a specific list of object properties and methods
19 divmod() This function returns a quotient and the remainder values
20 enumerate() This function returns an enumerate object
21 eval() This function evaluates and executes an expression
22 exec() This function execute a specific code
23 filter() This function returns filter items from an iterative object
24 float() This function returns a float value
25 format() This function formats a specific value
26 frozenset() This function returns a frozenset object
27 getattr() This function Returns a value of the specified attribute (property or method)
28 globals() This function Returns a dictionary representing the current global symbol table
29 hasattr() This function takes arguments as objects and strings, Returns True if the specified object has the specified attribute
30 hash() This function returns a hash value for specific object
31 help() This function executes and built-in help system
32 hex() This function returns hexadecimal value
33 id() This function returns the id of an object
34 input() This function will collect the data from user inputs and save it
35 int() This function returns integar value
36 isinstance() This function true if the specified object is an instance of a specified object is true otherwise False
37 issubclass() This function true if the specified class is a subclass of a specified object otherwise False
38 iter() This function returns iterator object
39 len() This fucntion return  length of an object
40 list() This function returns a list
41 locals() This function returns updated dictionary of the current local symbol table
42 map() This function specified iterator with the specified function applied to each item
43 max() This function returns largest value from iterative object
44 memoryview() This function returns a memory view of an object created from the given argument.
45 min() This function returns smallest value from iterative object
46 next() This function returns a next item from iterator
47 object() This function returns a object value
48 oct() This function returns a octal value from number
49 open() This function opens a files and returns a file object
50 ord() This function return Unicode of the specified character from interger
51 pow() This function returns the value of a to the power of b
52 print() This function prints data to standard ouput devices
53 property() This function returns a property attribute
54 range() This function returns a sequence of number starting from 0 and then it incremented by 1
55 repr() This function return a string containing a printable representation of an object
56 reversed() This function returns a reverse iterator. Object must be sequence
57 round() This function returnes rounded value
58 set() This function returns sets object
59 setattr() This function sets an attribute (property/method) of an object
60 slice() This function returns a slice object
61 sorted() This function returns a sorted list
62 staticmethod() This function converts a method to staticmethod()
63 str() This function returns a string object
64 sum() This function sum values from iterative object
65 super() This function return a proxy object that delegates method calls to a parent or sibling class of type
66 tuple() This function returns a tuple object
67 type() This function returns dataype of  value
68 vars() This function returns the __dict__ property of an object
69 zip() This function returns an iterator, from two or more iterators

 

admin

admin

Leave a Reply

Your email address will not be published. Required fields are marked *