Report Bug
Qus :

What is the output of following?

def f(a, b):
    print(a, b)
f(b=2, a=1)

Qus

निम्न code का output क्या होगा?

def f(a, b):
    print(a, b)
f(b=2, a=1)



A. 2 1
B. 1 2
C. Error
D. None


Solution
B. 1 2



Explanation
Keyword arguments are assigned according to parameter names, not their written order. <br><br> Keyword arguments में values parameter names के आधार पर assign होती हैं, लिखने के क्रम से नहीं।



Report Bug