Reverse Only Letters
Return a string where the letters of s appear in reverse order, but every character that is not a letter (digits, dashes and so on) stays at its original position.
Example 1
s "a-bC-dEf"
returns "f-Ed-Cba"
Letters abCdEf reversed are fEdCba, placed back into the letter slots: f-Ed-Cba.
Example 2
s "12ab"
returns "12ba"
Constraints
1 <= len(s) <= 100shas ASCII letters, digits and symbols, no spaces
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.