Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to slice string in python

b = "Hello, World!"
print(b[-5:-2])

#Output: orl
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #slice #string #python
ADD COMMENT
Topic
Name
2+5 =