Python · Starter
The basics: what a thing is and what it's for.
Which of these is a mutable data type in Python?
What does the self parameter represent in a Python instance method?
What is the output of type([]) in Python?
What does the `len()` function return for a dictionary?
What is a list comprehension used for?
What does `len("hello")` return?
What is the purpose of the `pass` statement?
What does `range(5)` produce?
How does a tuple differ from a list at the basic syntax level?
What does the `in` operator check when used with a list, e.g. `3 in [1, 2, 3]`?
What is the purpose of an `if __name__ == "__main__":` guard at the bottom of a Python script?
What does `"a,b,c".split()` return (with no argument)?
Besides being hashable, what must a Python dictionary's keys satisfy syntactically?
What does `print(f"{1+1}")` output?
What is the purpose of the `import` statement?
What does `None` represent in Python?
How does a set differ from a list in Python?
What does the `//` operator do in Python, e.g. `7 // 2`?
What is the purpose of a docstring (a triple-quoted string placed immediately after a `def` or `class` line)?
What does `type(3.0)` return?