Question: [Using Python] Write a program that firstly creates a list and initializes it with the following numbers: 11, -22, 33, -44, 55, -66 Then, use
[Using Python]
Write a program that firstly creates a list and initializes it with the following numbers: 11, -22, 33, -44, 55, -66 Then, use a for loop to find out all elements with a negative numeric value, and change the values of those elements to their respective index numbers. Finally, print out the modified list.
![[Using Python] Write a program that firstly creates a list and initializes](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3cb2f1610e_29466f3cb2eb05d7.jpg)
The original list is [11,22,33,44,55,66] The modified list is [11,1,33,3,55,5]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
