The generation of dictionary from the function is below:
The function will execute the mysql query
output = {} def s(a,b,c):output = {a:[b,c]}return output
a,b,c are coming from the database cursor = connection.cursor();cursor.execute(query)
my dictionary return output
is below
{'a':['test','10']}
{'b':['test','5']}
How to subtract the values in the dictionary 10 - 5
my code is below
k = []
for i,j in s.items():k.append(j[1])My output is `['10'],['10']`