Question: Using python, how to organize numbers in a list from biggest to smallest by its index in the original list. For example, I have a
Using python, how to organize numbers in a list from biggest to smallest by its index in the original list. For example, I have a list L1 containing 5 elements, and I want the result to be a reflection of the descending largest numbers in L1 by its respective index.
.
L1 = [72, 157, 254, 149, 69]
result_idx = [2,1, 3, 0, 4]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
