Home / Python / Day 1: Python Basics / Data Types

Data Types

Python has several built-in data types: int, float, str, bool, list, tuple, set, dict, and None.

Python Data Types

Every value in Python has a data type. Python's built-in types cover most programming needs.

Numeric Types

  • int: Integers (1, -5, 1000000)
  • float: Decimals (3.14, -0.5)
  • complex: Complex numbers (2+3j)

Text Type

  • str: Strings ("hello", "world")

Boolean Type

  • bool: True or False

Type Conversion

Convert between types using int(), float(), str(), bool().