Exam JN0-224 Topic 1 Question 18 Discussion

Actual exam question for Juniper's JN0-224 exam
Question #: 18
Topic #: 1
You want to make a list in Python to store data.
Which statement is the correct way to accomplish this task?

Suggested Answer: C Vote an answer

In Python, to create a list, you use square brackets []. The correct syntax to create a list containing the numbers 0 through 5 is:
L = [0, 1, 2, 3, 4, 5]
This statement creates a list object that stores the specified integers.
Other options are incorrect:
A defines a string, not a list.
B defines a set, which is an unordered collection with no duplicate elements.
D defines a tuple, which is an immutable sequence, not a list.
Reference:
Python Official Documentation: Discusses lists, sets, tuples, and their syntaxes.
Python Data Structures Guide: Provides examples of creating and manipulating lists.

by Darcy at May 13, 2026, 08:37 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
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.

0
0
0
10