def reverseVowels(self, s):
        vowels = "aeiou"
        string = list(s)
        i, j = 0, len(s) - 1
        while i < j:
            if string[i].lower() not in vowels:
                i += 1
            elif string[j].lower() not in vowels:
                j -= 1
            else:
                string[i], string[j] = string[j], string[i]
                i += 1
                j -= 1
        return "".join(string)
Make a sampler CPU mode.
dataset/ETHPy150Open kamyu104/LeetCode/Python/reverse-vowels-of-a-string.py/Solution.reverseVowels--crossover with--dataset/ETHPy150Open pfnet/chainer/chainer/utils/walker_alias.py/WalkerAlias.to_cpu