Download 165/solution/_reference.py from PRHW/loom-benchmark-mbpp: direct link, hf CLI and curl.
- Browser
- Download file 229 Bytes
-
https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/165/solution/_reference.py
- Command line
-
hf download hf://datasets/PRHW/loom-benchmark-mbpp/165/solution/_reference.py
-
curl -L -o _reference.py https://huggingface.co/datasets/PRHW/loom-benchmark-mbpp/resolve/main/165/solution/_reference.py
229 Bytes
| def count_char_position(str1): | |
| count_chars = 0 | |
| for i in range(len(str1)): | |
| if ((i == ord(str1[i]) - ord('A')) or | |
| (i == ord(str1[i]) - ord('a'))): | |
| count_chars += 1 | |
| return count_chars |