Delete Occurrences of Extra Elements in a List

takes two arguments: a list lst and a number num. If an element occurs in lst more than num times, remove the extra occurrence(s) and return the result.
[1, 1, 1, 1]
2
Total : 0 Discussion
Login