Question 1,601 of 1,420
mediumMultiple SelectObjective-mapped
350-401 Practice Question: Which two statements about using Python for…
Which two statements about using Python for configuration management and templating in network automation are true? (Choose two.)
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
✓
Jinja2 templates allow the use of variables and control structures like loops and conditionals to generate network device configurations.
The correct answers focus on Jinja2 templating and its integration with Python. The incorrect options either misstate Jinja2's capabilities (it does not execute commands), misidentify the library for YAML parsing (PyYAML, not Jinja2), or incorrectly claim that Python cannot be used for configuration generation (it can, via templates).
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Jinja2 templates allow the use of variables and control structures like loops and conditionals to generate network device configurations.
Why this is correct
Correct because Jinja2 is a powerful templating engine that supports variables, for loops, if statements, and filters, making it ideal for generating dynamic configurations.
- ✓
A Python script can load a Jinja2 template, render it with device-specific data, and push the resulting configuration to a network device.
Why this is correct
Correct because this is a common automation pattern: use Python to read a template, supply variables (e.g., from a YAML file), render the configuration, and then use Netmiko or NAPALM to apply it.
- ✗
Jinja2 can be used to execute CLI commands on network devices directly from within the template.
Why it's wrong here
Incorrect because Jinja2 is purely a templating engine; it does not execute commands or interact with devices. It only generates text output based on provided data.
- ✗
Jinja2 is a Python library used for parsing YAML files.
Why it's wrong here
Incorrect because YAML parsing is done by the PyYAML library, not Jinja2. Jinja2 is for templating, not parsing data formats.
- ✗
Python cannot be used to generate configuration files because it lacks templating capabilities.
Why it's wrong here
Incorrect because Python has several templating libraries (Jinja2, Mako, string.Template) and can easily generate configuration files using string formatting or dedicated templating engines.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 18, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.