without_x¶
Given a string, if the first or last chars are ‘x’, return the string without those ‘x’ chars, and otherwise return the string unchanged.
This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.