Friday, July 23, 2021

Get SubString from String; Python



fileName="Hello World!!"
#below Prints Hello
subStringValue=fileName[0:4]

#below Prints World
subStringValue2=fileName[6:10]


 

No comments: