What are Python's key data types?
Why Interviewers Ask This
This is a classic screening question for Python roles. Hiring managers ask it early in interviews to gauge your baseline understanding and determine if you can communicate technical concepts clearly.
Answer
Python has several built-in data types. Numeric: int (unlimited precision integers), float (64-bit floating point), complex (e.g., 3+4j). Text: str (immutable Unicode string). Sequence: list (mutable ordered sequence), tuple (immutable ordered sequence), range (immutable sequence of numbers). Mapping: dict (mutable key-value store, ordered since Python 3.7). Set: set (mutable unordered unique elements), frozenset (immutable set). Boolean: bool (True/False, subclass of int). Binary: bytes, bytearray, memoryview. None: NoneType — represents the absence of a value.
Pro Tip
Before answering, structure your response: one-line definition → real-world analogy → concrete example from a project. This makes even complex Python answers easy to follow.