for any ranges [start : Slice : String PYTHON TUTORIALS


PYTHON TUTORIALS » String » Slice »

 

for any ranges [start


aString = 'abcd'

print aString[0]
print aString[1:3]
print aString[2:4]
final_index = -len(aString)
print aString[-1]
print aString[-3:-1]
print aString[-4]



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo String
» Slice