Oct-03-2018, 09:27 PM
I have a dictionary which looks like
global_dict = {'GET': [1, 0, 0], 'POST': [1, 0, 0], 'PUT': [1, 0, 0], 'DELETE': [1, 0, 0]}I'm trying to increment the value of GET item only using
global_dict[request.method][0]+=1But what's happening when I try that is this.
global_dict = {'GET': [1, 0, 0], 'POST': [1, 0, 0], 'PUT': [1, 0, 0], 'DELETE': [1, 0, 0]}How do I update only list which is in GET alone and not the others.