exam questions

Exam JN0-221 All Questions

View all questions & answers for the JN0-221 exam

Exam JN0-221 topic 1 question 32 discussion

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

Click the Exhibit button.

Referring to the exhibit, what is the output from the print(x) line?

  • A. ["˜b', "˜c']
  • B. ["˜b', "˜c', "˜d']
  • C. ["˜a', "˜b', "˜c']
  • D. ["˜a', "˜b']
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
shiiitboi
Highly Voted 4 years, 2 months ago
Option A is correct. List slicing does not include the last item in the range
upvoted 6 times
...
rodobrian
Most Recent 3 years, 5 months ago
Correct, this is list slicing Python 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> my_list = ["a", "b", "c", "d", "e", "f", "g"] >>> x = my_list[1:3] >>> print(x) ['b', 'c'] >>>
upvoted 2 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