A string value is also treated as an array in Python. The elements inside each string can be accessed using index numbers.

a = "Wow Champs!"
print(a)
#A string is an array
print(a[0])
print(a[-1])
#slicing
print(a[5:8])
#slice from start
print(a[:3])
#slice from end
print(a[1:])
The link to the Github repository is here .