Computer Science, asked by sreyajayadeep123, 4 months ago

Find and write the output :
check1 = ['Learn', 'Quiz', 'Practice', 'Contribute']
check2 = check1
check3 = check1[:]

check2[0] = 'Code'
check3[1] = 'Mcq'

count = 0
for c in check1:
print(c,end="&")
print()
for c in check2:
print(c,end="&")
print()
for c in check3:
print(c,end="&")

Answers

Answered by 221064
0

Answer:

12

Explanation:

When assigning check1 to check2, we create a second reference to the same list. Changes to check2 affect check1. When assigning the slice of all elements in check1 to check3, we are creating a full copy of check1 which can be modified independently (i.e, any change in check3 will not affect check1)

Similar questions