List of lists and overall data manipulation
Hi,
I am trying to wrap my head around best practices when dealing with constant streams of data, and what are the best ways to manipulate them.
Let's say I have an outlet of an object spitting out lists that look something like this:
A1 A2 B1 B2 C1 C2 ... Z1 Z2
And some examples of what I'm looking to learn how to do:
1. If A1 ... Z1 are floats ranging from 0. to 1. (in no particular order) and A2 ... Z2 are ints ranging from 1 to 100 (in no particular order), what is the best way to get a list of values A2 ... Z2 sorted by the values of A1 ... Z1?
2. The example above, but for the value of A1*A2 ... Z1*Z2 sorted by the value of A1 ... Z1
Any help would be greatly appreciated, thank you!
Here is a solution of example 1 using [coll] to store and sort the pairs.
Broc, thank you for that. I was using ints as A2-Z2 in the example, but the solution I'm looking for should work for floats as all numbers as well.
Here's my solution to problem 1
Nice. I've made some modifications.