Easy way to sort a structured list by multiple parameters?
Posted: Sun Feb 18, 2018 2:41 am
Hi all,
How would you go about sorting a list by multiple parameters? Taking a list of screen resolutions, for example, how would you sort first by width, then by height, then by depth? Sorting in ascending order, I would want the output to be something like this:
Width: 640
Height: 480
Depth: 16
Width: 640
Height: 480
Depth: 32
Width: 800
Height: 480
Depth: 16
Width: 800
Height: 480
Depth: 32
Width: 800
Height: 600
Depth: 16
Width: 800
Height: 600
Depth: 32
Width: 1024
Height: 600
Depth: 16
Width: 1024
Height: 600
Depth: 32
Width: 1024
Height: 768
Depth: 16
Width: 1024
Height: 768
Depth: 32
Width: 1280
Height: 720
Depth: 16
Width: 1280
Height: 720
Depth: 32
Width: 1280
Height: 768
Depth: 16
Width: 1280
Height: 768
Depth: 32
Thanks you.
How would you go about sorting a list by multiple parameters? Taking a list of screen resolutions, for example, how would you sort first by width, then by height, then by depth? Sorting in ascending order, I would want the output to be something like this:
Width: 640
Height: 480
Depth: 16
Width: 640
Height: 480
Depth: 32
Width: 800
Height: 480
Depth: 16
Width: 800
Height: 480
Depth: 32
Width: 800
Height: 600
Depth: 16
Width: 800
Height: 600
Depth: 32
Width: 1024
Height: 600
Depth: 16
Width: 1024
Height: 600
Depth: 32
Width: 1024
Height: 768
Depth: 16
Width: 1024
Height: 768
Depth: 32
Width: 1280
Height: 720
Depth: 16
Width: 1280
Height: 720
Depth: 32
Width: 1280
Height: 768
Depth: 16
Width: 1280
Height: 768
Depth: 32
Thanks you.