On Fri, 11 Nov 2022 02:22:34 -0500, DFS <[email protected]> declaimed the
following:
>
>[(0,11), (1,1), (2,1),
> (0,1) , (1,41), (2,2),
> (0,9) , (1,3), (2,12)]
>
>The set of values in elements[0] is {0,1,2}
>
>I want the set of max values in elements[1]: {11,41,12}
Do they have to be IN THAT ORDER?
>>> data = [(0,11), (1,1), (2,1), (0,1) , (1,41), (2,2), (0,9) , (1,3),
>>> (2,12)]
>>> reshape = list(zip(*data))
>>> result = sorted(reshape[1])[-3:]
>>> result
[11, 12, 41]
--
Wulfraed Dennis Lee Bieber AF6VN
[email protected] http://wlfraed.microdiversity.freeddns.org/
--
https://mail.python.org/mailman/listinfo/python-list