Ajouter un tuple à un dictionnaire 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))