Question: Use Python Write a program that firstly creates a list and initializes it with the following numbers: 1, 2, 3, 4, 5, 6 Then, use
Use Python
Write a program that firstly creates a list and initializes it with the following numbers:
1, 2, 3, 4, 5, 6
Then, use a for loop to iterate over each element by their index numbers, and raise each element to the power of 2 (modify each element's value to its square). Finally, print out the modified list.

The original list is [1,2,3,4,5,6] The modified list is [1,4,9,16,25,36]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
