Agregue una tupla a un diccionario python
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))