how can i change the dict values which digit to int and have no quotes
User input this string
{"name":"John", "age":30, "city":"New York"}
what ive tried
t=[x for x in input()[2:-1].split(", ")]
w=[]
for i in t:
a=i
e=a.replace("'","").replace('"','').split(":")
w.append(e)
for i in w:
for j in i:
if j.isdigit():
j=int(j)
d=[tuple(x) for x in w]
print(d)
It shows that 30 type int but it has quotes
Output
[('name', 'John'), ('age', '30'), ('city', 'New York')]
I want 30 to be without quotes
[('name', 'John'), ('age', 30), ('city', 'New York')]