M o n t y P y t h o n
0 1 2 3 4 5 6 7 8 9 10 11
s = 'Monty Python'
print (s[0:4])
it prints the word until 3, where near 3 is 4 (0,1,2,3)
Mont
s = 'Monty Python'
print (s[6:7])
it prints letter,
P
s = 'Monty Python'
print (s[:6])
prints the word,
Monty
greeting = 'Hey man!'
new_greeting = 'g' + greeting[1:]
print(new_greeting)
prints,
gey man!