DRAG DROP
-
Drag and drop the code snippets from the bottom onto blanks in the Python script so that the program changes the IP address and saves it as a new JSON file on the disk. Not all options are used.
DRAG DROP
-
Drag and drop the code snippets from the bottom onto blanks in the Python script so that the program changes the IP address and saves it as a new JSON file on the disk. Not all options are used.
i hate such questions :(
brutal question.
given answer is correct The script reads a JSON file, modifies an IP address within the JSON structure, and then saves the modified JSON in both compact and indented formats into two separate files.
given ans should be correct
This is what I can gather 1. Open some file which contains json data. 2. Read that entire file into a string (json.read) 3. Converts the json string into a python dictionary array (json.load) 4. Modify the IP address of Gi0 to 192.168.1.2 in the python dictionary array 5. Convert the python dictionary array into back to a json string without identation (json.dump) 6 Convert the python dictionary array into back to a json string with indentation (json.dump) 7. Write the json string with and without identation to 2 seperate files (json.write) So I think the provided answer is correct.
anyone can confirm ?
Anyone can explain this?