In a post for beginners it’s probably worth mentioning that sets are unordered. If you use a set to remove duplicates you can no longer index the data. Converting back to a list may not keep the original order either (? unsure about this).
You are absolutely right. It may be worth adding the following
The set does not contain duplicate elements;
The elements of the set are immutable (they cannot be changed), but the set itself is changeable, and it can be changed;
Since the elements are not indexed, the sets do not support any slicing and indexing operations.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In a post for beginners it’s probably worth mentioning that sets are unordered. If you use a set to remove duplicates you can no longer index the data. Converting back to a list may not keep the original order either (? unsure about this).
You are absolutely right. It may be worth adding the following
The set does not contain duplicate elements;
The elements of the set are immutable (they cannot be changed), but the set itself is changeable, and it can be changed;
Since the elements are not indexed, the sets do not support any slicing and indexing operations.