Download 11/solution/_reference.py from PRHW/loom-benchmark-mbpp: direct link, hf CLI and curl.
- Browser
- Download file 270 Bytes
-
https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/11/solution/_reference.py
- Command line
-
hf download hf://datasets/PRHW/loom-benchmark-mbpp/11/solution/_reference.py
-
curl -L -o _reference.py https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/11/solution/_reference.py
270 Bytes
| def remove_Occ(s,ch): | |
| for i in range(len(s)): | |
| if (s[i] == ch): | |
| s = s[0 : i] + s[i + 1:] | |
| break | |
| for i in range(len(s) - 1,-1,-1): | |
| if (s[i] == ch): | |
| s = s[0 : i] + s[i + 1:] | |
| break | |
| return s |