What is the output of the below python code?
# Here y is a new reference to same list lst def myFun(y): y[0] = 7 # Driver Code (Note that lst is modified # after function call. lst = [1, 2, 3, 4, 5, 6] myFun(lst); print(lst)
Output:
[7, 2, 3, 4, 5, 6]
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Output:
[7, 2, 3, 4, 5, 6]
need an explanation for this answer? contact us directly to get an explanation for this answer