0

Can someone explain me, why when I use set in python like set([4, 3, 2, 1]), answer is sorted? As I know, set is just a hash-table and it just should delete duplicates. For example, C++ has unordered_set that is not sorted and set that is sorted. But what should I do with set in python if i don't need to sort it?

prostak
  • 149
  • 5

0 Answers0