In python, how can I partition a list of strings into several lists with no duplicates per list, taking as many string as possible in each iteration until every item has been inserted in a list?
Input:
["1", "2", "2", "3", "3", "3", "4", "5" ]
Output:
["1", "2", "3", "4", "5"]
["2", "3"]
["3"]
How can I do this efficiently?