Reverse Vowels of a String
Write a function that takes a string as input and reverse only the vowels of a string.
Example 1:
Example 2:
Note: The vowels does not include the letter "y".
分析
string里的swap char, 先转成List(str) ,swap完了再''.join(list)
注意包括大写
Last updated
Was this helpful?