Python supports 3 categories of data types:
- Basic Types -integer, float, complex, boolean and string
- Container Types - List, tuples, sets and dictionary
- User-defined Types - Classes
Integer
print(4)
Floats
print(4.5)
Boolean
print(True)
Complex
print(4+5j)
Strings
print('Mumbai')
print("Mumbai")
List
print([1,2,3,4,5])
Tuple
print((1,2,3,4,5))
Sets
print({1,2,3,4,5})
Dictionaries
print({"Name": "Heba", "Age" : 30, "gender": "Male"})
Top comments (0)