Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Python-Quizzes | Python List Quiz | Question 12

  • Last Updated : 17 Sep, 2020

Question 12: Find the output of the following program:

list = ['python', 'learning', '@', 'Geeks', 'for', 'Geeks'

(A) [‘python’, ‘@’, ‘for’]
(B) [‘Geeks’, ‘Geeks’, ‘learning’]
(C) [‘python’, ‘learning’, ‘@’, ‘Geeks’, ‘for’, ‘Geeks’]
(D) [‘python’, ‘Geeks’]

Answer: (A)

Explanation: In python list slicing can also be done by using the syntax listName[x:y:z] where x means the initial index, y-1 defines the final index value and z specifies the step size. If anyone of the values among x, y, and z is missing the interpreter takes the default value.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!