Python Data Types
Python Data Types
In [2]: a = 5
print(type(a))
b = 5.0
print(type(b))
c = 2 + 4j
print(type(c))
<class 'int'>
<class 'float'>
<class 'complex'>
100
[1, 2, 3]
['Loops', 'For', 'Loops', 4, 5]
In [16]: print(type(True))
print(type(False))
print(type(true))
<class 'bool'>
<class 'bool'>
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[16], line 3
1 print(type(True))
2 print(type(False))
----> 3 print(type(true))
s1 = set("rakesh")
print("Set with the use of String: ", s1)
Set with the use of String: {'r', 'e', 'a', 's', 'h', 'k'}
Set with the use of List: {'s', 'For'}
{'s', 'For'}
s For True
G
G
In [ ]: