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])







Click to Enlarge


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

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250