Articles → Python → Extract Substring In Python

Extract Substring In Python






Syntax


Variable_name[start index, end index]



Example




message = "hello gyan"
print("My name is :", message[6:10])





Output


Picture showing the output of Extract substring in python



Posted By  -  Karan Gupta
 
Posted On  -  Friday, February 1, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250