Solved

What Would Be the Value of the Variable List2 After

Question 5

Multiple Choice

What would be the value of the variable list2 after the execution of the following code? list1 = [1, 2, 3]
List2 = []
For element in list1
List2.append(element)
List1 = [4, 5, 6]


A) [1, 2, 3]
B) [4, 5, 6]
C) [1, 2, 3, 4, 5, 6]
D) invalid code

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions