mediumMultiple Select
350-401 Practice Question: Which two statements about using Python for…
Which two statements about using Python for network automation are true? (Choose two.)
⚠ Common exam trap
350-401 often tests library purpose confusion, especially paramiko vs. netmiko (low-level vs. high-level) and scapy vs. netmiko (packet crafting vs. device configuration), causing candidates to pick plausible-sounding but incorrect pairings.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The netmiko library is commonly used to automate SSH connections to Cisco devices.
Option A is correct because netmiko is a multi-vendor Python library built on top of Paramiko that simplifies establishing SSH (and Telnet) sessions to network devices such as Cisco IOS, IOS-XE, and NX-OS, handling prompts, paging, and enable mode automatically. Option C is correct because the requests library is the standard Python HTTP client used to send GET, POST, PUT, PATCH, and DELETE requests to REST APIs (for example, Cisco DNA Center, Meraki, or NX-API), typically with JSON payloads and authentication headers. Option B is incorrect because Paramiko is a low-level SSHv2 implementation, not a high-level network-automation API; netmiko provides that higher-level abstraction. Option D is incorrect because telnetlib sends credentials and data in cleartext, so it is not recommended for secure automation—SSH-based tools like netmiko or Paramiko should be used instead. Option E is incorrect because Scapy is a packet crafting, sending, and sniffing library, not a tool for pushing configuration commands to network devices.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The netmiko library is commonly used to automate SSH connections to Cisco devices.
Why this is correct
Netmiko builds on Paramiko to handle SSH transport, device prompts, and enable-mode escalation, so a Python script can drive Cisco CLI sessions programmatically. This satisfies the automation requirement by removing manual telnet or SSH interaction, unlike SNMP-based polling libraries.
- ✗
The paramiko library provides a high-level API for network automation tasks.
Why it's wrong here
Paramiko is a low-level SSHv2 implementation providing transport, channel and SFTP primitives; it does not offer the high-level, device-aware API the statement claims. It is tempting because it underpins many automation tools, and would be the right choice for building custom SSH sessions or file transfer.
- ✓
The requests library can be used to send HTTP requests to REST APIs on network devices.
Why this is correct
The requests library issues HTTP verbs such as GET and POST, carrying JSON or XML payloads to REST endpoints exposed by network devices. This satisfies the stem's requirement that Python can interact with REST APIs for automation.
- ✗
The telnetlib library is recommended for secure network automation.
Why it's wrong here
telnetlib transmits everything, including credentials, in cleartext, so it cannot satisfy secure automation. It is tempting because it is a standard-library module that does connect to devices and run commands, and would be acceptable only for lab or legacy devices where encryption is irrelevant.
- ✗
The scapy library is used to send configuration commands to network devices.
Why it's wrong here
Scapy crafts, sends and sniffs packets at layers 2–4; it has no mechanism for pushing configuration commands to devices. It is tempting because it is a genuine network automation library, and would be the right choice for packet manipulation, protocol fuzzing or traffic analysis rather than device configuration.
Go deeper
Related to this question
Learn chapter
SDN Controllers and Cisco ACI
Key term
Python for Network Engineers
Python for Network Engineers is the use of the Python programming language to automate, configure, monitor, and troubleshoot network devices like routers and switches.
Key term
Cisco DNA Center
A centralized network management and automation platform from Cisco that provides intent-based networking for easier configuration, monitoring, and troubleshooting of Cisco devices.
About these practice questions
This 350-401 question is part of Courseiva's 1,923-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
This 350-401 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 350-401 exam.