Changing the position of the camera using python script and then rendering using the new location

Hello, I am trying to use the classroom scene from the following link:
with some modifications for mist pass following the link:

I am taking inputs from the user using a JSON file and trying to change the location of the camera accordingly. The following is a snippet from the same:


I am later converting this into a dictionary (within the python script) and using the same to change the camera location. However, on rendering the images I see identical images.

I have created a function wherein I pass the camera object and the camera locations as the parameters. On running the below lines of code I can see the camera location changing

`for k,v in camera_locations.items():

but when I add lines to render the image I see identical images (i.e when I uncomment the lines above). Essentially I do not see the rendering with respect to the changed camera position. I am unable to understand why. Can someone help me with this?