Medium 10 questionsAI-generated
★★★★★★★★★★Not rated yet

Python Quiz: functions, files and exceptions

Move up to the intermediate level in Python: comprehensions, default arguments, **kwargs, slicing, self, venv, except, with, sets and f-strings.

Start the quiz Created by lecouze13

Question preview

  1. What does [n * n for n in [1, 2, 3]] return?
  2. With def f(a, b=2): return b, what does f(1) return?
  3. What does the **kwargs parameter contain inside a function?

… and 7 more questions to discover by playing.