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...
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 >>>...
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...
The chr() function in Python is a built-in function that returns a string representing a character whose Unicode code point is the given integer. It is essentially the inverse of the ord() function, which returns the Unicode code point of a...
Dir function The dir() function without argument return the list of names in the current local scope. The dir(object) function with argument return a list of valid attributes for the given object. Examples Example 1 >>> dir() ['__builtins__', '__doc__', '__loader__', '__name__',...