Question: 4. (20 points) (Each part is 4 pts.) Write the resalt of each picce of code given below: (a) a_list =[4,5,6,2,3,4,5,6] print ( a_ 1

 4. (20 points) (Each part is 4 pts.) Write the resalt

4. (20 points) (Each part is 4 pts.) Write the resalt of each picce of code given below: (a) a_list =[4,5,6,2,3,4,5,6] print ( a_ 1 ist [1:3]) (b) a1 ist =[4,5,6,2,3,4,5,6] b=set(a118t) print (b) (c) a_list =[4,5,6,2,3,4,5,6] a_list. append (9) a_list.extend ([3,4]) print (1en (a_11st)) print (a_list.index (4)) (d) (c) a_dict = { 'two': :2, 'three':3, 2: 'dos', 3: 'tres', '3': 'tri ' } for 1 in a_dict: print(i)

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!