exam questions

Exam JN0-221 All Questions

View all questions & answers for the JN0-221 exam

Exam JN0-221 topic 1 question 12 discussion

Actual exam question from Juniper's JN0-221
Question #: 12
Topic #: 1
[All JN0-221 Questions]

As part of an application to manage network devices, you must query hundreds of network devices and return the unique set of IP prefixes blocked by configured firewall filters. To accomplish this task, you will require a mutable data type that contains unordered, unique elements.
Which Python data type will fulfill these requirements?

  • A. dictionaries
  • B. lists
  • C. tuples
  • D. sets
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Techdude1
2 years, 6 months ago
Exam code 221 was based on Python: 3.4+ (222 is Python: 3.6+). What this means is that dictionaries would be the answer as they were unordered, changeable (mutable) and do not allow duplicates in the version that exam was based on(3.4). If it was based on 3.7 nothing works because sets are unchangeable (not mutable).
upvoted 1 times
...
Evangelist69
2 years, 10 months ago
Selected Answer: D
D. sets question says "mutable" but must be wrong, must be "inmutable"
upvoted 1 times
...
FR99
2 years, 11 months ago
Selected Answer: D
Set is Unordered and Unique
upvoted 1 times
...
F_A
3 years, 3 months ago
List items are ordered, changeable, and allow duplicate values - https://www.w3schools.com/python/python_lists.asp Tuple items are ordered, unchangeable, and allow duplicate values - https://www.w3schools.com/python/python_tuples.asp Set items are unordered, unchangeable, and do not allow duplicate values - https://www.w3schools.com/python/python_sets.asp Dictionary items are ordered, changeable, and does not allow duplicates. As of Python version 3.7, dictionaries are ordered. In Python 3.6 and earlier, dictionaries are unordered - https://www.w3schools.com/python/python_dictionaries.asp This question must be old, all answers seem incorrect.
upvoted 3 times
...
exam_study
3 years, 4 months ago
Selected Answer: D
https://stackoverflow.com/questions/14193438/are-python-sets-mutable/14193582
upvoted 1 times
...
mkizwan
3 years, 5 months ago
from the junioer website the question is immutable and we answer sets.. but this one mutable. Should we answer lists?
upvoted 1 times
...
zulhelmi
3 years, 7 months ago
Answer definitely D. sets
upvoted 2 times
...
shiiitboi
4 years, 2 months ago
Option D: Sets
upvoted 4 times
...
shiiitboi
4 years, 2 months ago
Set is correct choice
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago