Zeitpunkt Nutzer Delta Tröts TNR Titel Version maxTL Mi 24.07.2024 00:01:07 61.956 0 3.574.077 57,7 Fosstodon 4.2.10 500 Di 23.07.2024 00:00:03 61.956 -3 3.570.705 57,6 Fosstodon 4.2.10 500 Mo 22.07.2024 00:01:10 61.959 +1 3.567.825 57,6 Fosstodon 4.2.10 500 So 21.07.2024 00:01:07 61.958 +1 3.564.861 57,5 Fosstodon 4.2.10 500 Sa 20.07.2024 00:01:10 61.957 +1 3.561.604 57,5 Fosstodon 4.2.10 500 Fr 19.07.2024 13:57:34 61.956 -1 3.558.474 57,4 Fosstodon 4.2.10 500 Do 18.07.2024 00:00:27 61.957 +1 3.553.476 57,4 Fosstodon 4.2.10 500 Mi 17.07.2024 00:01:10 61.956 -1 3.550.157 57,3 Fosstodon 4.2.10 500 Di 16.07.2024 00:00:36 61.957 +6 3.547.999 57,3 Fosstodon 4.2.10 500 Mo 15.07.2024 00:00:01 61.951 0 3.544.794 57,2 Fosstodon 4.2.10 500
Rodrigo 🐍🚀 (@mathsppblog) · 05/2024 · Tröts: 104 · Folger: 102
Mi 24.07.2024 12:28
1. `combinations`
This iterator will produce tuples of length `r` with all the unique combinations of values from `iterable`.
(“Unique” will make use of the original position in `iterable`, and not the value itself.)
E.g., what ice cream flavour combinations can I get?
2. `combinations_with_replacement`
Same as `combinations`, but values can be repeated.
E.g., what ice cream flavour combinations can I get if I allow myself to repeat flavours?
from itertools import combinations flavours = ["chocolate", "vanilla", "strawberry"] for scoops in combinations(flavours, 2): print(scoops)
Diagram with a snippet of code showing how to use `combinations_with_replacement`. from itertools import combinations with _replacement flavours = ["chocolate", "vanilla", "strawberry"] for scoops in combinations with_replacement(flavours, 2): print(scoops)
[Öffentlich] Antw.: 0 Wtrl.: 0 Fav.: 0