April 2024
Beginner to intermediate
500 pages
24h 20m
English
Python has a number of functions that can be called without an object reference. Table B.3 shows some common built-in functions.
Table B.3 Built-in Functions
| chr(num) | Returns the character represented by the Unicode value num. |
| dir() | Returns the list of names defined in the current local scope. |
| float(numOrString) | Converts the number or string to a floating-point number. |
| help(str) | Returns documentation on str. |
| input(prompt) | Outputs the prompt, then returns what the user types as a string. |
| isinstance(object, class) | Returns True if object is an instance of class; False if not. |
| int(numOrString) | Converts the number or string to an integer. |
| len(sequence) | Returns the number of elements in sequence. |
| list(sequence) ... |
Read now
Unlock full access