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

print()
<class 'str'>
Hello World

In [4]:
#integer variable
integerVariable = 20
print(type(integerVariable))
print(integerVariable)

print()
<class 'int'>
20

In [5]:
#float variable
floatVariable= 20.5
print(type(floatVariable))
print(floatVariable)

print()
<class 'float'>
20.5

In [6]:
#complex variable
complexVariable= 1j
print(type(complexVariable))
print(complexVariable)

print()
<class 'complex'>
1j

In [7]:
#list variable
listVariable= ["apple", "banana", "cherry"]
print(type(listVariable))
print(listVariable)

print()
<class 'list'>
['apple', 'banana', 'cherry']

In [8]:
#tuple variable
tupleVariable= ("apple", "banana", "cherry")
print(type(tupleVariable))
print(tupleVariable)

print()
<class 'tuple'>
('apple', 'banana', 'cherry')

In [9]:
#range variable
rangeVariable= range(6)
print(type(rangeVariable))
print(rangeVariable)

print()
<class 'range'>
range(0, 6)

In [10]:
#dict variable
dictVariable= {"name" : "John", "age" : 36}
print(type(dictVariable))
print(dictVariable)

print()
<class 'dict'>
{'name': 'John', 'age': 36}
In [11]:
#set variable
setVariable= {"apple", "banana", "cherry"}
print(type(setVariable))
print(setVariable)

print()
<class 'set'>
{'cherry', 'apple', 'banana'}

In [12]:
#frozenset variable
frozensetVariable= frozenset({"apple", "banana", "cherry"})
print(type(frozensetVariable))
print(frozensetVariable)

print()
<class 'frozenset'>
frozenset({'cherry', 'apple', 'banana'})

In [13]:
#bool variable
boolVariable= True
print(type(boolVariable))
print(boolVariable)

print()
<class 'bool'>
True

In [14]:
#bytes variable
bytesVariable= b"Hello"
print(type(bytesVariable))
print(bytesVariable)

print()
<class 'bytes'>
b'Hello'

In [15]:
#bytearray variable
bytearrayVariable= bytearray(5)
print(type(bytearrayVariable))
print(bytearrayVariable)

print()
<class 'bytearray'>
bytearray(b'\x00\x00\x00\x00\x00')

In [16]:
#memoryview  variable
memoryviewVariable= memoryview(bytes(5))
print(type(memoryviewVariable))
print(memoryviewVariable)

print()
<class 'memoryview'>
<memory at 0x7f33e4d8ae88>

In [ ]: