Download 131/solution/_reference.py from PRHW/loom-benchmark-mbpp: direct link, hf CLI and curl.
- Browser
- Download file 279 Bytes
-
https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/131/solution/_reference.py
- Command line
-
hf download hf://datasets/PRHW/loom-benchmark-mbpp/131/solution/_reference.py
-
curl -L -o _reference.py https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/131/solution/_reference.py
279 Bytes
| def reverse_vowels(str1): | |
| vowels = "" | |
| for char in str1: | |
| if char in "aeiouAEIOU": | |
| vowels += char | |
| result_string = "" | |
| for char in str1: | |
| if char in "aeiouAEIOU": | |
| result_string += vowels[-1] | |
| vowels = vowels[:-1] | |
| else: | |
| result_string += char | |
| return result_string |