Write ends(s) that returns a string made of the first and the last character of s. If s has fewer than 2 characters, return s unchanged.
ends('Python')
→ 'Pn'ends('a')
→ 'a'Submit runs 5 tests, including hidden edge cases.
Run your code to see the output here.