python_builtin_functions
python_builtin_functions
6. bool(): Converts a value to a Boolean, using the standard truth testing procedure.
print(bool(0)) # Output: False
print(bool(1)) # Output: True
10. chr(): Returns the string representing a character whose Unicode code point is the
integer.
print(chr(97)) # Output: 'a'
16. dir(): Attempts to return a list of valid attributes for the object.
print(dir([])) # Output: List of attributes and methods of a list
17. divmod(): Takes two numbers and returns a pair of numbers (a tuple) consisting of their
quotient and remainder.
print(divmod(9, 4)) # Output: (2, 1)