String Indexing

Create a string

string = 'Strings are defined as ordered collections of characters.'
string[:]
'Strings are defined as ordered collections of characters.'
string[0:3]
'Str'
string[:3]
'Str'
string[-3:]
'rs.'
string[2:5]
'rin'
string[0:10:2]
'Srnsa'
string[::-1]
'.sretcarahc fo snoitcelloc deredro sa denifed era sgnirtS'