First and Last Character
Completed
Read a word and print its first character and its last character on separate lines.
Input
One word (at least 1 character).
Output
Two lines.
Example
Input
python
Output
p n
Editor
Python
Hints
Indexes start at 0.
Negative indexes count from the end: -1 is the last character.
Solution explanation
s[0] is the first character and s[-1] the last.
Show solution
word = input()
print(word[0])
print(word[-1])