The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #313
def f(a=2, /):
pass
In the code snippet above, f(a=1) is not allowed. The function accepts a positional argument that is optional. If the function is called as f(a=1) , the passed argument is not positional and as such, it will throw a SyntaxError error. (stackoverflow.com/questions/9450656)
Considering the code snippet below, which function call is not allowed? (3.8+)
— The Python Quiz (@thepythonquiz) December 29, 2020
def f(a=2, /):
pass
f(1)
f()
f(a=1)#python #python3 #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: