Juniper
JN0-222 · Question #84
Exhibit Referring to the exhibit, what is the output from the print(x) line?
The correct answer is A. ['b', 'c']. 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]
Python
Question
Exhibit Referring to the exhibit, what is the output from the print(x) line?
Exhibit
Options
- A['b', 'c']
- B['b', 'c', 'd']
- C['a', 'b', 'c']
- D['a', 'b']
How the community answered
(48 responses)- A71% (34)
- B10% (5)
- C4% (2)
- D15% (7)
Explanation
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]
Topics
#Python#list slicing#indexing#data types
Community Discussion
No community discussion yet for this question.
