DEV Community

Avinash Mathi
Avinash Mathi

Posted on

Slicing in python programming

slicing prpgramming
a="Avinash"
print(a[:])
b="keeramangalam"
print(b[3:])
c="Hello Avinash"
print(c[4:])
d="Hello world"
print(c[:4])
e="Keeramangalam"
print(e[:-2])
g="Keeramangalam"
print(g[-5:-2])
o/p
Avinash
ramangalam
o Avinash
Hell
Keeramangal
gal

Top comments (0)