Question

What are list1 and list2 after the following lines of code?

list1 = [1, 43]
list2 = [x for x in list1]
list1[0] = 22

Solution

Verified

lst1=[22,43]lst1 = \left[ 22,43\right]

lst2=[1,43]lst2= \left[ 1,43\right]

Create an account to view solutions

Create an account to view solutions

More related questions

1/4

1/7