Question: Why am I getting [2, 4, 6, 8, 10, 12, 0, 4, 8, 12, 16, 20] when I want to only get [2, 4, 6,
Why am I getting
[2, 4, 6, 8, 10, 12, 0, 4, 8, 12, 16, 20]
when I want to only get
[2, 4, 6, 8, 10, 12] ?
Thanks for your help in advance.

In this problem, you will need to write code to manipulate a list of integers. [16]: \# Define a list of integers numbers=[1,2,3,4,5,6] First, you will iterate through the list and double each integer so the the list (still named "numbers") is now: [2,4,6,8,10,12] [n [17]: M #Fillinthecodetodoubleeachelementinthelistforiinrange(len(numbers)):numbers.append(i2)numbers=[i*2foriinnumbers] [n [18]: print(numbers)#thisshouldshow[2,4,6,8,10,12][2,4,6,8,10,12,0,4,8,12,16,20]
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
