Python Built-in Functions
Python provides number of built-in functions, that can be used to perform different type of operations.
Built-in function like abs()
, all()
, any()
, sorted()
, sum()
, pow()
, round()
, divmod()
, chr()
, ord()
, bin()
, hex()
, oct()
, max()
, min()
and len()
are widely used for operations.
Built-in Functions
Function Name | Descriptions |
---|---|
abs(x) | Return the absolute value of the argument. |
all(iterable) | Return True if bool(x) is True for all values x in the iterable. |
all(iterable) | Return True if bool(x) is True for all values x in the iterable. |
any(iterable) | Return True if bool (x) is True for any x in the iterable. |
sorted(iterable, key=None, reverse=False) | Return a new list containing all items from the iterable in ascending order. |
sum( iterable, start) | Return the sum of a 'start' value (default: 0) plus an iterable of numbers |
pow(base,exp,mod) | Equivalent to base**exp with 2 arguments or base**exp % mod with 3 arguments |
round(number,ndigits) | Round a number to a given precision in decimal digits. |
divmod(x,y) | Return the tuple (x//y, x%y). Invariant: div*y + mod == x. |
chr(i) | Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff. |
ord(c) | Return the Unicode code point for a one-character string. |
bin(number) | Return the binary representation of an integer. |
hex(number) | Return the hexadecimal representation of an integer. |
oct(number) | Return the octal representation of an integer. |
max(iterable, *) | With two or more arguments, return the largest argument. |
min(iterable, *) | With two or more arguments, return the largest argument. |
len(obj) | Return the number of items in a container. |
Next chapter is if.. in python
Video Lecture
Training For College Campus
We offers college campus training for all streams like CS, IT, ECE, Mechanical, Civil etc. on different technologies
like
C, C++, Data Structure, Core Java, Advance Java, Struts Framework, Hibernate, Python, Android, Big-Data, Ebedded & Robotics etc.
Please mail your requirement at info@prowessapps.in
Projects For Students
Students can contact us for their projects on different technologies Core Java, Advance Java, Android etc.
Students can mail requirement at info@prowessapps.in