In [25]:
stringvariable = "Hello world"
print(type(stringvariable))
print(integervariable)

integervariable = 1
print(type(integervariable))
print(integervariable)

floatvariable = 1.5
print(type(floatvariable))
print(floatvariable)

listvariable = ["blue", "red", "yellow"]
print(type(listvariable))
print(listvariable)

tuplevariable = ("purple", "orange", "green")
print(type(tuplevariable))
print(tuplevariable)

rangevariable = range(1)
print(type(rangevariable))
print(rangevariable)

dictvariable = {"name" : "John", "age" : "20"}
print(type(dictvariable))
print(dictvariable)

setvariable = {"apple", "banana", "cherry"}
print(type(setvariable))
print(setvariable)

frozenvariable = frozenset({"pink", "violet", "megenta"})
print(type(frozenvariable))
print(frozenvariable)

boolvariable = True
print(type(boolvariable))
print(boolvariable)

bytesvariable = b"Hello"
print(type(bytesvariable))
print(bytesvariable)

bytearrayvariable = bytearray(1)
print(type(bytearrayvariable))
print(bytearrayvariable)

memoryvariable = memoryview(bytes(1))
print(type(memoryvariable))
print(memoryvariable)

complexvariable = complex(1j)
print(type(complexvariable))
print(complexvariable)
<class 'str'>
1
<class 'int'>
1
<class 'float'>
1.5
<class 'list'>
['blue', 'red', 'yellow']
<class 'tuple'>
('purple', 'orange', 'green')
<class 'range'>
range(0, 1)
<class 'dict'>
{'name': 'John', 'age': '20'}
<class 'set'>
{'cherry', 'banana', 'apple'}
<class 'frozenset'>
frozenset({'violet', 'megenta', 'pink'})
<class 'bool'>
True
<class 'bytes'>
b'Hello'
<class 'bytearray'>
bytearray(b'\x00')
<class 'memoryview'>
<memory at 0x7faf28704e88>
<class 'complex'>
1j
In [ ]: