<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Examples:<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">>>> l=[1,2,3,4,5]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">>>> l[-1]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">5</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">>>> l[-2]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">4</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">>>> l[2:4]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">[3, 4]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">>>> l[2:]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">[3, 4, 5]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">>>> l[-2:]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">[4, 5]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">>>> l[:3]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">[1, 2, 3]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">>>> l[::2]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">[1, 3, 5]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">>>> l[::]</div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Menlo;" class="">[1, 2, 3, 4, 5]</div></div><div class=""><br class=""></div></body></html>