Author: codertutor_3o6d0o

Python Abs

Abs function The abs() function return the absolute value of a number. The argument inside the function may be an integer or a floating point number. Examples Example 1 >>> x = 5 >>> abs(x) 5 >>> Example 2 >>> y...

Python All

All function The all(iterable) function return True if all elements of the iterable are true or if the iterable is empty. Examples Example 1 >>> x = [1, 2, 3] >>> x.__iter__ <method-wrapper '__iter__' of list object at 0x02D549E0> >>> all(x)...

Python Any

Any function The any(iterable) function return True if any element of the iterable is true. Examples Example 1 >>> a = [5, 6, 7] >>> a.__iter__ <method-wrapper '__iter__' of list object at 0x02EF7148> >>> any(a) True >>> Example 2 >>> a...

Python Bin

Bin function The bin() function convert an integer number to a binary string. Examples Example 1 >>> bin(1) '0b1' >>> a = 1 >>> bin(a) '0b1' >>> Example 2 >>> bin(2) '0b10' >>> a = 1 >>> b = 1 >>>...

Python Bool

Bool function The bool() function return a boolean value: True or False. The argument value must be of type int. Examples Example 1 >>> x = 5 >>> y = 2 >>> bool( x > y ) True >>> bool( x...