-1

I have a list of days with repeated entries (as in the example shown below). I don't know what's in the list, as it is provided by the user.

  1. 2022-07-20
  2. 2022-07-20
  3. 2022-07-20
  4. 2022-07-21
  5. 2022-07-22
  6. 2022-07-22
  7. 2022-07-22
  8. 2022-07-22
  9. 2022-07-23
  10. 2022-07-23

I want to get all the individual entries in the list, without necessarely knowing how many times they appear (in other words I want to know that there is at least one of each of the entries). The output should look something like this:

  1. 2022-07-20
  2. 2022-07-21
  3. 2022-07-22
  4. 2022-07-23

Is there a python function to do so?

alcdtastv
  • 11
  • 3

1 Answers1

0

You can make a Set with your list, as sets are collections of unique objects:

l=[1,2,2,3,3,3]
s=set(l)
print(s)
{1, 2, 3}