Python Notes - Data - Types
Python Notes - Data - Types
int x = 20
float x = 20.5
complex x = 1j or x = 3 + 4j
range x = range(6)
bytes x = b"Hello"
bytearray x = bytearray(5)
memoryview x = memoryview(bytes(5))
NoneType x = None
Setting the specific Data Type
Data Type Example
int x = int(20)
float x = float(20.5)
range x = range(6)
bool x = bool(5)
bytes x = bytes(5)
bytearray x = bytearray(5)
memoryview x = memoryview(bytes(5))