Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
IncRnd
on Jan 20, 2021
|
parent
|
context
|
favorite
| on:
Again on 0-based vs. 1-based indexing
Python's -1 is the 0-based index of the last element.
robertlagrant
on Jan 20, 2021
[–]
Surely it should be -0 :-)
IncRnd
on Jan 20, 2021
|
parent
|
next
[–]
It's sort of the reverse direction 0-index :).
throw386452
on Jan 20, 2021
|
parent
|
prev
[–]
~0 is the new -1 :)
IncRnd
on Jan 20, 2021
|
root
|
parent
[–]
That's true. :)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: