QuestenaPractice that shows what to review next
Question 81

Classify parameters placed after a bare * or after an *args parameter. Which statements are true? Select all that apply.

  1. A parameter after a bare * must be named in the call.Correct answer
  2. The marker makes every preceding parameter keyword-only.
  3. A keyword-only parameter cannot have a default.
  4. A parameter after *args cannot be supplied positionally.Correct answer

Explanation

Parameters after either marker cannot be filled by additional positional arguments and must be named in the call. The marker affects following parameters, not preceding ones, and keyword-only parameters may still declare defaults.

Continue with this test

Start practice
Question 81: Classify parameters placed after a bare * or after an *args… · Python Fundamentals · Questena