Courseiva
Question 1,125 of 1,840
mediumMultiple SelectObjective-mapped

350-401 Practice Question: Which two statements about Python data structures…

Which two statements about Python data structures used 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

Dictionaries are used to store key-value pairs such as device IP, username, and password.

Correct answers: B and D. B is correct because dictionaries are ideal for storing key-value pairs such as device parameters (IP, username, password). D is correct because lists are ordered and can hold multiple device names or IPs, and they support iteration. A is incorrect because tuples are immutable, so they cannot be modified after creation, which limits their use for dynamic data. C is incorrect because sets are unordered and do not support indexing; they are used for unique elements, not ordered collections. E is incorrect because strings are immutable and not suitable for storing multiple separate values.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Tuples are commonly used to store device credentials because they can be modified easily.

    Why it's wrong here

    Incorrect because tuples are immutable; they cannot be modified after creation, making them unsuitable for dynamic credential storage.

  • Dictionaries are used to store key-value pairs such as device IP, username, and password.

    Why this is correct

    Correct because dictionaries map keys to values, which is perfect for storing device parameters like IP, username, and password.

  • Sets are ordered and allow indexing to retrieve specific elements.

    Why it's wrong here

    Incorrect because sets are unordered and do not support indexing; they are used for unique elements and set operations.

  • Lists are ordered and can be used to store multiple device names for iteration.

    Why this is correct

    Correct because lists maintain order and allow iteration, making them suitable for storing a list of device names or IPs.

  • Strings are mutable and ideal for storing multiple device configurations.

    Why it's wrong here

    Incorrect because strings are immutable in Python and are not designed to hold multiple separate values; they are single sequences of characters.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 18, 2026

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.

Loading comments…

Sign in to join the discussion.

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.