<commit_before>def recursive(s):
    l = len(s)
    if l < 2:
        return s
    return recursive(s[l//2:]) + recursive(s[:l//2])

s = "hello there"
print(recursive(s))

def iterative(s):
    r = list(s)
    i, j = 0, len(s) - 1
    while i < j:
        r[i], r[j] = r[j], r[i]
        i += 1
        j -= 1
    return "".join(r)

print(iterative(s))

def pythonic(s):
    r = list(reversed(s))
    return "".join(r)

print(pythonic(s))<commit_msg>Add different implementation of reverse_string.py<commit_after>def recursive(s):
    l = len(s)
    if l < 2:
        return s
    return recursive(s[l//2:]) + recursive(s[:l//2])

s = "hello there"
print(recursive(s))

def iterative(s):
    r = list(s)
    i, j = 0, len(s) - 1
    while i < j:
        r[i], r[j] = r[j], r[i]
        i += 1
        j -= 1
    return "".join(r)

print(iterative(s))

def pythonic(s):
    r = list(reversed(s))
    return "".join(r)

def ultra_pythonic(s):
    return s[::-1]

print(ultra_pythonic(s))
{'fraction_non_alphanumeric': 0.18781725888324874, 'fraction_numerical': 0.015228426395939087, 'mean_word_length': 2.3767123287671232, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7215412', 'n_tokens_mistral': 431, 'n_tokens_neox': 413, 'n_words': 99}