1string = "Hello World"
2string_slice = string[1:10] # "ello Worl" (index 1 up to 10)
3string_last_chars = string[-5:] # "World" (5th index from last to the end)
4H = string[0] # "H"
1sentence = 'Python programming is fun.'
2
3result = sentence.index('is fun')
4print("Substring 'is fun':", result)
5
6result = sentence.index('Java')
7print("Substring 'Java':", result)