Feb-08-2022, 04:36 AM
(This post was last modified: Feb-08-2022, 04:36 AM by deanhystad.)
One other thing. You can't sort a set. By definition a set is an unordered collection.
From the docs: https://docs.python.org/3/tutorial/datas....html#sets
From the docs: https://docs.python.org/3/tutorial/datas....html#sets
Quote:Python also includes a data type for sets. A set is an unordered collection with no duplicate elements. Basic uses include membership testing and eliminating duplicate entries. Set objects also support mathematical operations like union, intersection, difference, and symmetric difference.If you put sorted values in a set they will not retain their order.