Level up your Python skills with interactive fill‑in‑the‑blanks exercises! Practice variable declaration, assignment, and usage in bite‑sized challenges.
🔍 Fill in the Blanks
🟢 Beginner
Variable names in Python must start with a letter or an __________.
Answer
underscore
Python variable names can begin with a letter (a-z, A-Z) or underscore (_), but not numbers or other characters.
The assignment operator in Python is the __________ symbol.
Answer
equals
The equals sign (=) is used for assignment in Python (e.g., x = 5).
In Python, variable names are case-__________.
Answer
sensitive
Python treats myVar and myvar as different variables.
The __________ keyword is used to delete a variable in Python.
Answer
del
The del statement removes the binding of a variable.
The special value representing 'no value' in Python is __________.
Answer
None
None is Python's null/nothing value.
🟡 Intermediate
Variables in Python are __________, meaning they can change type when assigned a new value.
Answer
dynamic
Python uses dynamic typing, allowing variables to hold values of any type and change types during execution.
Python variables are actually __________ to objects in memory.
Answer
references
Variables store references to objects rather than containing the objects themselves.
Python checks variable types at __________ rather than compile time.
Answer
runtime
This is why Python is called a dynamically typed language.
When you assign a = b, both variables become __________ to the same object.
Answer
references
Assignment creates a new reference, not a copy of the object.
Functions without a return statement implicitly return __________.
Answer
None
This is why print(my_function()) shows None when the function has no return.
🔴 Advanced
The __________ function can be used to check a variable's current type.
Answer
type
type(x) returns the class/type of object x currently references.
To properly check for None, you should use the __________ operator rather than ==.
Answer
is
The 'is' operator checks for identity with the None singleton.