Convertir les clés du dictionnaire en int python
d = {'1':'145' , '2':'254' , '3':'43'}
d = {int(k):int(v) for k,v in d.items()}#convert both keys and values to int
>>> d
{1: 145, 2: 254, 3: 43}
Angry Ape