Built-in Functions

LEELA S
2 min readMar 8, 2022

The python has a number of pre-defined functions that are always available for use.These functions are called built-in functions.

Python Built-in Functions

  • abs( ) -The absolute value of a number is returned
  • all( ) - when all the elements in the iterable are true or empty, it returns true
  • any( ) -Any element in the iterable is true then it returns true.If there is no element it returns false
  • ascii( ) -It returns a string contains a printable illustration of an object.The non-ascii characters will be escaped
  • bin( ) -Integer is converted into s binary string
  • bool( ) -Value is converted into bool
  • bytes( ) -Returns a new byte object
  • bytearray( ) -new array of bytes will be returned
  • callable( ) -When the object argument is appered as callable this function returns true else it returns false
  • chr( ) -String is returned to represent a character
  • classmethod( ) -classmethod of a function will be returned
  • compile( ) -Source is compile with the help AST object
  • complex( ) -Number and strings are converted into a complex number
  • delattr( ) -Objects named attribute will be deleted
  • dict( ) -creation of new dictionary
  • dir( ) -list of names are returned with respect to the current local scope
  • divmethod( ) -Quotient and remainder is returned while performing the integer division
  • enumerate( ) -Enumerate object is returned
  • eval( ) -parsing and evalution of the arguments
  • exec( )- Pyhton code is executed dynamically
  • print( ) -Print is used to display the output ot the screen
  • len( ) -Returns the find the length of the string
  • list( ) -Creation a new list
  • max( ) -Calculate the max element in the string
  • min( ) -Calculate the min element in the string
  • input( ) -Read the input from the user
  • type( ) -Returns the type of the specified object
  • pow( ) -Returns the calculated value of x to the power of y i.e, x^y

--

--