HelloString = "Hello Python!"
print(HelloString)
print("Python exercise: Slicing Strings")
print (HelloString[2:10]) #from index 2 to 10-1
print (HelloString[2:]) #from index 2 to end
print (HelloString[:10]) #from begin to 10-1
print (HelloString[::3]) #every 3 characters
print (HelloString[::-1]) #every characters in reverse order
output:
![Python exercise: Slicing Strings Python exercise: Slicing Strings](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje8CW_bgN52lQ7oq3VbEv8MPODudJgfRXRrlca622BAoUrcSOKi3fxVZbl10GRBDaGYRSq_6gVzaGDjDMcJljULaQ6cg4ALuMPV2P2Kwhi1mn1DVzwNdxEcgiPUakzUS8pJIEUOvbjLYk/s400/SlicingStrings.png)