String indexing example added (#30300)

* String indexing example added

* Update index.md
This commit is contained in:
Pooja-Talan
2019-03-26 09:45:31 +05:30
committed by Randell Dawson
parent a4de1ad170
commit f8e613862e

View File

@ -318,4 +318,9 @@ a = [10,20,30]
b = [10,20,30]
print a is b # prints False (since lists are mutable in Python)
print(str1[:4])
# Above code gives the output as Free
print(str[4:])
# Above code gives the output as CodeCamp
```