QuestionQ133

VerifiedFunctions and Exceptions

Which of the following function calls can invoke the function defined below?

def test(a, b, c, d):  
Choose three
Explanation

Python permits positional arguments followed by keyword arguments, and it permits all arguments to be positional or all to be keyword arguments. It does not permit a positional argument after a keyword argument. Therefore, the valid calls are the one with three positional arguments followed by d=4, the one with four positional arguments, and the one with four keyword arguments.

Community Discussion

No comments yet. Be the first to start the discussion!