bing
Flat 10% & upto 50% off + 10% Cashback + Free additional Courses. Hurry up
×
UPTO
50%
OFF!
Intellipaat
Intellipaat
  • Live Instructor-led Classes
  • Expert Education
  • 24*7 Support
  • Flexible Schedule

Python Built-in Functions

Back in Python functions module, we learned that there are three types of functions in Python, namely, user-defined functions, lambda functions, and built-in functions. In this module, we will learn all that we need to know about Python built-in functions to get started it.

So, without any further ado, let’s get started.

Python interpreter has various pre-defined functions that are ready and available to use. You don’t have to define these functions to use them, you can directly call them. These functions are called built-in functions.

In this series of Python tutorial, we have used various built-in functions of python in previous modules. The very basic built-in function that we have used in almost every module is print() function to display a given object.

Learn Python in 16 hrs from experts

Table of Built-in Functions in Python

Now print is just one out of many built-in functions in Python. Let’s learn about more built-in functions through the following table of various built-in functions along with their descriptions.

Method Description
Python abs() Returns absolute value of a number and the returned value is always positive.
Python all() Returns true when all elements in iterable is true and if there are no elements in. It returns false if any element is evaluates to be false.
Python any() Checks if any Element of an Iterable is True. Unlike all(), It returns false if there are no elements in the iterable.
Python ascii() This method returns String Containing Printable Representation
Python bin() Used for converting integer to binary string
Python bool() Used for converting a Value to Boolean
Python bytearray() This function returns array of given byte size
Python bytes() This function returns immutable bytes object
Python callable() Used for checking if the Object is Callable
Python chr() This function returns a Character (a string) from an Integer
Python classmethod() This function returns class method for given function
Python compile() This function returns a Python code object
Python complex() Used for creating a Complex Number
Python delattr() Used for deleting Attribute from the Object
Python dict() Used for creating a Dictionary
Python dir() This function tries to Return Attributes of Object
Python divmod() This function returns a Tuple of Quotient and Remainder
Python enumerate() This function returns an Enumerate Object
Python eval() This function runs Python Code Within Program
Python exec() Used for Executing Dynamically Created Program
Python filter() Used for constructing iterator from elements which are true
Python float() Used for returning floating point number from number, string
Python format() This function returns formatted representation of a value
Python frozenset() This function returns immutable frozenset object
Python getattr() This function returns value of named attribute of an object
Python globals() This function returns dictionary of current global symbol table
Python hasattr() This function returns a value that tells whether an object has named attribute
Python hash() This function returns hash value of an object
Python help() This function Invokes the built-in Help System
Python hex() Used for converting to Integer to Hexadecimal
Python id() This function returns Identify of an Object
Python input() This function usually reads and returns a line of string
Python int() This function returns integer from a number or string
Python isinstance() Checks if an Object is an Instance of Class
Python issubclass() Checks if an Object is Subclass of a Class
Python iter() This function returns iterator for an object
Python len() This function returns Length of an Object
Python list() Function Used for creating a list in Python
Python locals() This function returns dictionary of a current local symbol table
Python map() This function applies functions and returns a List
Python max() This function returns largest element
Python memoryview() This function returns memory view of an argument
Python min() This function returns smallest element
Python next() This function retrieves the next element from Iterator
Python object() This function creates a Featureless Object
Python oct() This function converts integer to octal
Python open() This function returns a File object
Python ord() This function returns Unicode code point for Unicode character
Python pow() This function evaluates and returns x to the power of y
Python print() Used for printing the Given Object
Python property() This function returns a property attribute
Python range() This function return sequence of integers between start and stop
Python repr() This function returns printable representation of an object
Python reversed() This function returns reversed iterator of a sequence
Python round() This function rounds a floating point number to n digits places.
Python set() This function returns a Python set
Python setattr() sets value of an attribute of object
Python slice() Used for creating a slice object specified by range()
Python sorted() This function returns sorted list from a given iterable
Python staticmethod() This function creates static method from a function
Python str() This function returns informal representation of an object
Python sum() Used for adding items of an Iterable
Python super() This function allows you to Refer Parent Class by super
Python tuple() Function This function creates a Tuple
Python type() This function Returns Type of an Object
Python vars() This function Returns __dict__ attribute of a class
Python zip() This function Returns an Iterator of Tuples
Python __import__() This function is and advanced Function Called by import

These are all the built-in functions in Python. They all perform their respective operations when executed. To use them, all you have to do is call them and pass the relevant argument as mentioned in the description of each built in function.

With this, we come to an end of this module. The next module highlights Python arrays. See you there.

Previous Next

Download Interview Questions asked by top MNCs in 2019?

"0 Responses on Python Built-in Functions"

Leave a Message

100% Secure Payments. All major credit & debit cards accepted Or Pay by Paypal.
top

Sales Offer

Sign Up or Login to view the Free Python Built-in Functions.