Dodaj krotność do Pythona słownika
from collections import defaultdict
d = defaultdict(list)
d[i].append((left, right))
Ghaith Alzin
from collections import defaultdict
d = defaultdict(list)
d[i].append((left, right))