If you're a fan of Python type hinting, you may have noticed that there are two different ways to create your own types: type aliases and using the NewType helper.
Type aliases look like this:
Vector = list[float]Local Host doesn't collect any of your data. Nothing.
I hope you enjoy Local Host! If you have any questions about this privacy notice, drop me a line on hi@s1mn.io and I'll be happy
| #!/usr/bin/env python3 | |
| from itertools import combinations | |
| # `combinations` gives all possible combinations of a sequence, with each | |
| # combination in sorted order. So e.g. `combinations([1, 2, 3, 4], 3)` will | |
| # yield: | |
| # | |
| # 1, 2, 3 | |
| # 1, 2, 4 |