From f8e613862eeaf07d5f42214886d928dfd2264904 Mon Sep 17 00:00:00 2001 From: Pooja-Talan Date: Tue, 26 Mar 2019 09:45:31 +0530 Subject: [PATCH] String indexing example added (#30300) * String indexing example added * Update index.md --- guide/english/python/basic-operators/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/guide/english/python/basic-operators/index.md b/guide/english/python/basic-operators/index.md index 7bec618152..84b100185d 100644 --- a/guide/english/python/basic-operators/index.md +++ b/guide/english/python/basic-operators/index.md @@ -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 ```