This content originally appeared on DEV Community and was authored by Avinash Mathi
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
This content originally appeared on DEV Community and was authored by Avinash Mathi
Avinash Mathi | Sciencx (2024-09-14T15:53:42+00:00) Slicing in python programming. Retrieved from https://www.scien.cx/2024/09/14/slicing-in-python-programming/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.