Message394061
Hi, some time ago I was looking for a function in itertools, actually, the combination functions allow us to have or not repetitions of element, have in consideration that if we allow repetitions there can be any amount of them, no way to limit the number of repetitions.
Here I asked in stackoverflow about this if there is a lib or option, in the end we wasn't able to found any about this and there was an answer with the solution.
I think this solution worth to be added to itertools, conceptually, the actual 2 functions of combinations are particular cases of this function.
https://stackoverflow.com/questions/67559105/combinatory-with-n-picked-elements-and-limited-repetitions-in-python/67559625
Well, there can be a extension of this too, where we can say, "how many times every particular element can be repeated".
Both of this things world be useful.
Thx. |
|
Date |
User |
Action |
Args |
2021-05-20 20:26:22 | latot | set | recipients:
+ latot |
2021-05-20 20:26:22 | latot | set | messageid: <1621542382.26.0.0131727923077.issue44197@roundup.psfhosted.org> |
2021-05-20 20:26:22 | latot | link | issue44197 messages |
2021-05-20 20:26:21 | latot | create | |
|