Setting specific data type

You can determine the data type of any object with the type() function.

a = int(5)
b = float(5.5)
c = complex(1j)
d = str("hello")
e = bool(True)
f = list((1, 2, 3))
g = tuple((1, 2, 3))
h = set((1, 2, 3))
i = dict(val1 = 2, val2 = 3)
j = frozenset(("first", "second", "third"))
k = bytes(b"Hello")
l = bytearray(2)
m = memoryview(bytes(2))

print(type(a))
print(type(b))
print(type(c))
print(type(d))
print(type(e))
print(type(f))
print(type(g))
print(type(h))
print(type(i))
print(type(j))
print(type(k))
print(type(l))
print(type(m))
Output
<class 'int'>
<class 'float'>
<class 'complex'>
<class 'str'>
<class 'bool'>
<class 'list'>
<class 'tuple'>
<class 'set'>
<class 'dict'>
<class 'frozenset'>
<class 'bytes'>
<class 'bytearray'>
<class 'memoryview'>