निम्नलिखित कोड का परिणाम क्या है ?
What is the output of the following code ?
def disp(*arg):
for i in arg:
print(i)
disp(name="Rajat", age="20")
A)
B)
C)
D)
Explanation:
Sure!
The function disp(*arg)
expects positional arguments, but you passed keyword arguments (name="Rajat", age="20"
). This causes a TypeError
.
Answer: (A) TypeError.