-
Notifications
You must be signed in to change notification settings - Fork 0
Python Tips & Tricks
Joey Kleiner edited this page Nov 28, 2022
·
34 revisions
|---|---|
| Text Type: | str | “Hello World”
| Numeric Types: | int, float, complex | 20, 99.142, (10+7j)
| Sequence Types: | list, tuple, range | [1, 2, 3], (1, 2, 3), range(6)
| Mapping Type: | dict {key:value} | {"name" : "John", "age" : 35}
| Set Types: | set, frozenset | {"apple", "banana", "cherry"}, frozenset({"apple", "banana", "cherry"})
| Boolean Type: | bool | True or False
| Binary Types: | bytes, bytearray, memoryview | b"Hello", bytearray(5), memoryview(bytes(5))
| None Type: | NoneType | None
print()