Practice mode Python

What does it mean to say that Python is dynamically typed?

Correct answer B. Types belong to objects and are checked at runtime, so a name can be rebound to a value of a different type

Explanation

In Python, names are just references to objects, and each object carries its own type. The same name can refer to an int and later to a str, and type errors appear when an operation is attempted at runtime. Python is still strongly typed: "3" + 4 raises TypeError rather than converting silently.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.