Modifying Lists Quiz
Question 1 of 80% Complete
What is the result of this slice assignment?
nums = [1, 2, 3, 4, 5]
nums[1:4] = [10, 20]
print(nums)1, 10, 20, 5
1, 10, 20, 4, 5
10, 20, 3, 4, 5
An error occurs
What is the result of this slice assignment?
nums = [1, 2, 3, 4, 5]
nums[1:4] = [10, 20]
print(nums)1, 10, 20, 5
1, 10, 20, 4, 5
10, 20, 3, 4, 5
An error occurs