Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 113
    Note that indexes in python start from 0, so the indexes for your example list are 0 to 4 not 1 to 5
    – plugwash
    Commented Oct 2, 2018 at 16:54
  • @plugwash you could just do idx+1 Commented May 22 at 15:44