nerdexam
Cisco

350-401 · Question #452

Running the script causes the output in the exhibit. Which change to the first line of the script resolves the error?

The correct answer is A. from ncclient import manager. Explanation Option A (from ncclient import manager) is correct because it uses proper Python syntax to import the specific manager module from the ncclient package, making it directly accessible in the script without needing to reference the full package path. Option B (import ma

Submitted by brentm· Mar 6, 2026Automation

Question

Running the script causes the output in the exhibit. Which change to the first line of the script resolves the error?

Exhibits

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

Options

  • Afrom ncclient import manager
  • Bimport manager
  • Cfrom ncclient import*
  • Dncclient manager import

How the community answered

(43 responses)
  • A
    86% (37)
  • B
    2% (1)
  • C
    5% (2)
  • D
    7% (3)

Explanation

Explanation

Option A (from ncclient import manager) is correct because it uses proper Python syntax to import the specific manager module from the ncclient package, making it directly accessible in the script without needing to reference the full package path.

Option B (import manager) is incorrect because it attempts to import manager as a standalone module without specifying the ncclient package it belongs to, which would cause a ModuleNotFoundError. Option C (from ncclient import *) would technically work by importing everything from ncclient, but it is not the targeted fix the question asks for and is considered bad practice. Option D (ncclient manager import) is completely invalid Python syntax and would immediately throw a SyntaxError.

Memory Tip: Think of the from...import syntax as an address: from [package/house] import [specific item/room]. When you need a specific tool like manager from the ncclient toolbox, use from ncclient import manager - it's precise, clean, and follows proper Python import conventions used heavily in network automation (NETCONF/YANG workflows).

Topics

#Python#ncclient#Import Statements#Network Automation

Community Discussion

No community discussion yet for this question.

Full 350-401 Practice