GATE 2026 Data Science and Artificial Intelligence question: Consider the given Python program. code Which of the following is the correct output of…
Consider the given Python program.
def append_to_lst(val, lst=[]):
lst.append(val)
return lst
print(append_to_lst(1))
print(append_to_lst(2))
print(append_to_lst(3, []))
Which of the following is the correct output of this program?
Show answer
This question is in an all-India live mock that is open now. Its answer appears here when the mock closes.