Python List Indexing and Slicing Presentation


This is the presentation associated with the python list indexing and slicing video.

[dflip id=”3388″ ][/dflip]

Download Presentation

Python List Indexing and Slicing Video Question

This is the Question that was asked in the python list indexing and slicing video

Question :

What is the output of the following code:

numbers = [1,6,3,4,5,6]
print(numbers[-5:-3:-1])

[bg_collapse view=”button-blue” color=”#ffffff” icon=”eye” expand_text=”Show Answer” collapse_text=”Hide Answer” ]

In [1]:
numbers = [1,6,3,4,5,6]
print(numbers[-5:-3:-1])
[]

[/bg_collapse]