Hello guys!
Does anyone know why it seems impossible to add 2 exact same numbers to a list of numbers?
Thanks a lot.
Hello guys!
Does anyone know why it seems impossible to add 2 exact same numbers to a list of numbers?
Thanks a lot.
My guess is that the list is treating the two numbers as being the same (not in value, but as the same object) and the list can only contain one copy at most of any object. If thatās the case, a workaround is to store the number in itās own āthingā and then maintain a list of those āthingsā. Itās more overhead than you probably would like, but it should work.
Yes, @Scott 's answers to both (the reason and the workaround) are right. Weāll fix this at some point, but in the meantime, thatās a good workaround.
Is this going to be added so that ālist of numbersā doesnāt throw out repeat numbers?