nerdexam
Cisco

350-401 · Question #1186

Drag and Drop Question 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

The correct answer is read(); loads(); dumps(); write(). The correct sequence follows the standard read-parse-serialize-write workflow for JSON file manipulation in Python. First, read() retrieves the raw string content from the opened file, then loads() parses that JSON string into a Python dictionary (allowing IP address modification

Submitted by weili_xi· Mar 6, 2026Network Programmability and Automation - specifically working with data formats (JSON) and Python scripting to read, modify, and write structured configuration data, commonly tested in CCNA (200-301) or DEVASC (200-901) certification domains.

Question

Drag and Drop Question 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. Answer:

Exhibit

350-401 question #1186 exhibit

Answer Area

Drag items

write()loads()dumps()open()read()

Correct arrangement

  • read()
  • loads()
  • dumps()
  • write()

Explanation

The correct sequence follows the standard read-parse-serialize-write workflow for JSON file manipulation in Python. First, read() retrieves the raw string content from the opened file, then loads() parses that JSON string into a Python dictionary (allowing IP address modification), then dumps() serializes the modified dictionary back into a JSON-formatted string, and finally write() saves that string to the new output file.

Topics

#Python file I/O#JSON parsing#Network automation#Data serialization

Community Discussion

No community discussion yet for this question.

Full 350-401 Practice