Question: 1 - Create a list called ( list _ 1 ) with five different integers entries greater than zero. 2 - Then set list _

1- Create a list called (list_1) with five different integers entries greater than zero.
2- Then set list_2= list_1
3- Change list_2[1] to different entry
4- What happened to list_1?
5- Now set list_3= list_1[:]
6- Change list_3[2] to different entry
7- What happened to list_1?
8- Now create a function chng_frst_TO_zro(1) that takes a list, sets its first entry to zero, and print the list.
9- Apply the function to all three lists list_1, list_2 and list_3?
10- What happened to the lists?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!