Does the mathematical definition of a set specify/imply that its elements be unique?
For context, this question has arisen in my mind from my experience using the Python programming language where one of the properties of the 'Set' data structure is that its elements are necessarily unique. Prior to this I had done a maths degree, but don't recall this being highlighted when learning about [mathematical] sets; certainly not with the emphasis it is given in Python.
Moreover, I feel like I came across questions or problems where sets would sometimes have repeated elements (perhaps problems in probability or combinatorics), but I may be mis-remembering this or it may have simply been an abuse of the notation. But an example might be:
What is the probability that the sum of two numbers, one each drawn randomly from the sets $A = \{1, 2, 2, 3, 3, 3\}$ and $B = \{1, 2, 3, 4\}$ is at least 6?
(where the desired answer is 8/24, rather than 3/12)
The Set Theory Wikipedia page does not use the term "unique" or "distinct" in reference to set elements. I came across this Stack Overflow question, but it's obviously geared heavily towards programming, so it's hard to know if that answers are really about the mathematical concept rather than programming data structures. It does mention that a set where repeated elements are allowed is called a Multiset, and in making this distinction, the Wikipedia page for Multiset does assert that a set is only allowed a single instance of an element. But it goes on to say that the term Multiset was only coined in the 1970s, so I'm left wondering what Mathematicians did before then if they wanted collections of objects with duplicates?