Home
Python Tutorial
Introduction
Data Type
Statement
Operator
String
Tuple
List
Dictionary
Collections
Function
Class
File
Buildin Function
Buildin Module
Database
Regular Expressions
Thread
Tkinker
wxPython
XML
Network
CGI Web
Windows
slice « String « Python Tutorial
Python Tutorial
String
slice
5.29.slice
5.29.1.
Slice a string
5.29.2.
How to Access Values (Characters and Substrings) in Strings
5.29.3.
for any ranges [start:end], we get all characters starting at offset start up to, but not including, the character at end.
5.29.4.
When either a starting or an ending index is missing, they default to the beginning or end of the string, respectively.