Q:

What is the output of the below python code?

0

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)

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Output:

[7, 2, 3, 4, 5, 6]

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now