In [26]:
#string variable
stringVariable = "Hello World"
print(stringVariable)
print(type(stringVariable))

print()

#integer variable
integerVariable= 20
print(integerVariable)
print(type(integerVariable))

#float
x = 20.5
print(x)
print(type(x))

#complex
x = 1j
print(x)
print(type(x)) 

#list
x = ["apple", "banana", "cherry"]
print(x)
print(type(x)) 

#tuple
x = ("apple", "banana", "cherry")
print(x)
print(type(x)) 

#range
x = range(6)
print(x)
print(type(x)) 

#dict
x = {"name" : "John", "age" : 36}
print(x)
print(type(x)) 

#set
x = {"apple", "banana", "cherry"}
print(x)
print(type(x)) 

#frozenset
x = frozenset({"apple", "banana", "cherry"})
print(x)
print(type(x))

#bool
x = True
print(x)
print(type(x))

#bytes
x = b"Hello"
print(x)
print(type(x)) 

#betearray
x = bytearray(5)
print(x)
print(type(x)) 

#memoryview
x = memoryview(bytes(5))
print(x)
print(type(x)) 
Hello World
<class 'str'>

20
<class 'int'>
20.5
<class 'float'>
1j
<class 'complex'>
['apple', 'banana', 'cherry']
<class 'list'>
('apple', 'banana', 'cherry')
<class 'tuple'>
range(0, 6)
<class 'range'>
{'name': 'John', 'age': 36}
<class 'dict'>
{'apple', 'cherry', 'banana'}
<class 'set'>
frozenset({'apple', 'cherry', 'banana'})
<class 'frozenset'>
True
<class 'bool'>
b'Hello'
<class 'bytes'>
bytearray(b'\x00\x00\x00\x00\x00')
<class 'bytearray'>
<memory at 0x7fd5afb8cdc8>
<class 'memoryview'>
In [15]:
 
1j
<class 'complex'>
In [ ]:
 
In [ ]: