by microtherion · 6y ago · 0 comments
I find this notation slightly clearer than the python version. It took me some time to remember whether range(15) includes 15 or not.
Once I knew these two facts, it didn't add much confusion.
1. Indexing starts from 0
2. Thus, range can be thought "from up to one before x", x here would be 15.
And I learned this pretty early and did not get confused later on.
If you're anything like me, you'll end up spending quite a bit of time looking up the documentation to the range operator to remind yourself how this week's language works again.