String indexing example added (#30300)

* String indexing example added

* Update index.md
pull/33137/head^2
Pooja-Talan 2019-03-26 09:45:31 +05:30 committed by Randell Dawson
parent a4de1ad170
commit f8e613862e
1 changed files with 5 additions and 0 deletions

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
```