These are the fundamental data types in Python:
-
Integer → positive, negative, and zero values
-
String →
' '," ",''' ''' -
Float → decimal numbers → example:
3.14,9.99 -
Boolean →
True,False -
None → represents no value
file: 9_data_types.py
age = 25 # Integer
price = 9.99 # Float
name = "xnocode" # String
is_active = True # Boolean
data = None # NoneNote
Python is case-sensitive, so
TrueandFalsemust start with capital letters.