Given a string s, return a new string made of its first character followed by its last character.
If s is empty return "". If s has just one character, that character counts as both the first and the last.
Examples
Input: s = "python"
Output: "pn"
Input: s = "x"
Output: "xx"
Input: s = ""
Output: ""
Constraints
0 <= len(s) <= 1000smay contain letters, digits, spaces and punctuation
Goals
- Read the first and last character with indexing
- Handle an empty string and a one-character string