Question: 1. (10 pts.) Consider the following code in Python def icom4036 (list): print list #output (1) list += [47,11] print list #output (2) x =

1. (10 pts.) Consider the following code in Python def icom4036 (list): print list #output (1) list += [47,11] print list #output (2) x = [1,2,3,4,5] icom4036 (x) print x #output (3) (a) Use the code to explain parameter passing by object in python (b) What are data printed in output (1), (2) and (3)? Is the list modified function? If yes, how to avoid modifying the list? a )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
