Types in Python
| Types | Expression | Data Type |
|---|---|---|
| Integers | 11 | int |
| real number | 21.213 | float |
| words | “Hello Python 101” | str |
| Boolean | true/false | bool |
Type command in Python:
type(int/float/str)
*int and float can be both positive or negative.
0 is an even number.
Cast
convert of types
int(true)=1
int(false)=0
