Q:

I'm learning Python and I don't understand this notation

Note how the start is always included, and the end always excluded. This makes sure that s[:i] + s[i:] is always equal to s:
>>> word[:2] + word[2:]
'Python'
>>> word[:4] + word[4:]
'Python'

I don't understand what thee above notation is.

A:

The python indices are as below
P   y   t   h   o   n
0   1   2   3   4   5 

So if you ask s[0:1] it is start index of 0 to end index of 1. Thus only P
So if you ask s[4:], anything right of index at 4(start).
So if you ask s[:4], anything left of index at 4(end).

