Slicing
Completed
Read a word with at least 5 letters. Print: its first 3 characters, its last 3 characters, and the word without its first and last character — each on its own line.
Input
One word.
Output
Three lines.
Example
Input
python
Output
pyt hon ytho
Editor
Python
Hints
s[start:stop] includes start but excludes stop.
Leave out start or stop to go from the beginning or to the end.
Solution explanation
Slices never raise an IndexError; w[:3] takes up to index 3 (not included).
Show solution
w = input()
print(w[:3])
print(w[-3:])
print(w[1:-1])