Checkpoint 9.6.1.
- python
- That would be s[0:6].
- rocks
- That would be s[7:].
- hon r
- Yes, start with the character at index 3 and go up to but not include the character at index 8.
- Error, you cannot have two numbers inside the [ ].
- This is called slicing, not indexing. It requires a start and an end.
What is printed by the following statements?
s = "python rocks"
print(s[3:8])