One bit of Python I’ll never get…
>>> “hello”[2:4]
‘ll’
>>> “hello”[2:]
‘llo’
>>> “hello”[:4]
‘hell’
Do any of those not make sense to you? Here’s how I see it, and my confusion;
“hello” represents a 5 character string… and indexing starts at 0, something most programmers are all familiar with. The “[" "]” characters are used to subscript (or index) the string (which is actually a list of [...]
