<jupyter_start><jupyter_text><jupyter_code># 하노이 탑

a = []

def hanoi(n, from_pos, aux_pos, to_pos):
    if n == 1:
        a.append([from_pos, to_pos])
    else:
        hanoi(n-1, from_pos, to_pos, aux_pos)
        hanoi(1, from_pos, aux_pos, to_pos)
        hanoi(n-1, aux_pos, from_pos, to_pos)
    
    return a

def solution(n):
    
    b = hanoi(n,1,2,3)
    
    return b

solution(1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13711583924349882, 'fraction_numerical': 0.018912529550827423, 'mean_word_length': 2.719298245614035, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '590308', 'license': 'MIT', 'n_tokens_mistral': 204, 'n_tokens_neox': 196, 'n_words': 36, 'path': 'fun_coding/Programmers/level3/Hanoi_Top.ipynb', 'repo_name': 'kangyeolyoun2/python-coding-practice-folder', 'size': '423'}