Python usesdynamic typing, a core concept emphasized in programming language textbooks. In dynamically typed languages, a variable name does not permanently “own” a type. Instead, theobjectcreated by an expression has a type, and the variable becomes a reference to that object. Therefore, the type associated with a variable at any moment is determined by the value assigned to it. For example, after x = 7, x refers to an integer object. After x = "seven", the same name now refers to a string object. The type changes because the binding changes, not because the variable’s type declaration was edited.
Option A describesstatic typingsystems (common in languages like Java, C, or C++), where programmers declare types and compilers enforce them. Python does not require such declarations for ordinary variables. Option B is incorrect because type assignment is deterministic, not random. Option C is incorrect because Python does not default variables to strings; it assigns whatever type results from the right-hand-side expression.
This model is closely tied to Python’s runtime behavior: type checks occur during execution, and functions can accept values of different types as long as the operations used are valid (often discussed as “duck typing”). This flexibility supports rapid development, but also motivates careful testing and, in larger systems, optional type hints for documentation and tool support.