Thank you for your advice, Raymond, which I much appreciate. I have started to use the more_itertools package.
I probably also need to take Counter() more seriously but I have shied away from it until now, fearing that it might be more focussed on 'counting' than on 'multiset operations' (i.e. such as the API here: https://multiset.readthedocs.io/en/stable/). Brian _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/7OXU46WVKOQ43U3TFLRZCHRTLLRJNKIQ/ Code of Conduct: http://python.org/psf/codeofconduct/