nerdexam
CiscoCisco

350-401 · Question #1042

350-401 Question #1042: Real Exam Question with Answer & Explanation

The correct answer is D: a key-value pair in string type. The script prints a string representation of the dictionary data because f-strings convert embedded expressions into their string equivalent.

Submitted by the_admin· Mar 6, 2026Automation

Question

Refer to the exhibit. What is printed to the console when this script is run?

Options

  • Aa key-value pair in tuple type
  • Ban error
  • Ca key-value pair in list type
  • Da key-value pair in string type

Explanation

The script prints a string representation of the dictionary data because f-strings convert embedded expressions into their string equivalent.

Common mistakes.

  • A. The output is not a tuple type; it is a string representation of a dictionary.
  • B. The script is syntactically correct and will execute without generating an error.
  • C. The output is not a list type; it is a string representation of a dictionary.

Concept tested. Python f-string dictionary representation

Reference. https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals

Topics

#Python scripting#Data types#Output interpretation

Community Discussion

No community discussion yet for this question.

Full 350-401 PracticeBrowse All 350-401 Questions