chaine de caractere python

>>> chaine = "Stéphanie"
>>> print(chaine[0], chaine[3])
S p

Here is what the above code is Doing:
1. We create a variable called chaine and assign it the string “Stéphanie”.
2. We print the first and fourth characters of chaine.
3. We print the first and fourth characters of chaine.

You can also use negative indices to access characters from the end of the string:

>>> chaine = “Stéphanie”
>>> print(chaine[-1], chaine[-4])
e S