String indexing example added (#30300)
* String indexing example added * Update index.mdpull/33137/head^2
parent
a4de1ad170
commit
f8e613862e
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue