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       # None

Note

Python is case-sensitive, so True and False must start with capital letters.

<< Python Case-Sensitive | Python type() Function >>