Strings in Python

Source code :

a='Hello'
print(a)
print(a[0])
print(a[1:4])
print(a[:4])
print(a[1:])
print(a[:])

Output :

Hello
H
ell
Hell
ello
Hello

Output :


                

Comments :