nerdexam
Cisco

350-401 · Question #1336

Refer to the exhibit. A network engineer must use a Python script to convert data received from a network device. Which type of data is printed to the console when the script runs?

The correct answer is A. dictionary with a key-value pair. Explanation Option A is correct because when Python parses structured data (typically JSON) received from a network device using methods like json.loads(), it converts the data into a dictionary, which stores data as key-value pairs (e.g., {"hostname": "Router1", "interface": "Gi

Submitted by jordan8· Mar 6, 2026Automation

Question

Refer to the exhibit. A network engineer must use a Python script to convert data received from a network device. Which type of data is printed to the console when the script runs?

Exhibits

350-401 question #1336 exhibit 1
350-401 question #1336 exhibit 2

Options

  • Adictionary with a key-value pair
  • Blist of lists
  • Clist of strings
  • Dtuple list

How the community answered

(47 responses)
  • A
    91% (43)
  • B
    2% (1)
  • C
    4% (2)
  • D
    2% (1)

Explanation

Explanation

Option A is correct because when Python parses structured data (typically JSON) received from a network device using methods like json.loads(), it converts the data into a dictionary, which stores data as key-value pairs (e.g., {"hostname": "Router1", "interface": "Gi0/0"}). The exhibit likely shows a script using json.loads() or similar parsing, resulting in a dictionary object being printed to the console.

Why the distractors are wrong:

  • B (list of lists) - This would require nested list structures [[...],[...]], which is not the typical output of parsing structured network device data from JSON/XML.
  • C (list of strings) - A list of strings ["string1", "string2"] would result from splitting plain text output, not from parsing structured key-value formatted data.
  • D (tuple list) - Tuples are immutable sequences using parentheses (); Python's JSON parser does not produce tuples by default.

Memory Tip: Think "JSON = Dictionary" - whenever a Python script uses json.loads() to parse network device output, the result is always a dictionary (or list of dictionaries). Network automation almost universally relies on this key-value structure, making dictionary the go-to answer when you see data conversion from a network device.

Topics

#Python scripting#JSON data#Python dictionaries#Data conversion

Community Discussion

No community discussion yet for this question.

Full 350-401 Practice