Site icon MCQs | eBooks – Textbook Solutions

What is the output of the following code?

my_list = [1, 2, 3, 4]
print(my_list[1:3])

A. [2, 3]
B. [1, 2, 3]
C. [3, 4]
D. [1, 3, 4]

Option: A

Exit mobile version