<jupyter_start><jupyter_text>Table of ContentsSelection Sort Selection Sort======Section 2.5.1Page 41<jupyter_code>def selection_sort(data_unsorted: list) -> list:
    data_sorted = []
    while data_unsorted:
        m = min(data_unsorted)
        data_unsorted.remove(m)
        data_sorted.append(m)
    else:
        return data_sorted
        
assert selection_sort([3, 2, 1])       == [1, 2, 3]
assert selection_sort(['c', 'a', 'b']) == ['a', 'b', 'c']<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15163934426229508, 'fraction_numerical': 0.022540983606557378, 'mean_word_length': 3.657142857142857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '221518', 'license': 'Apache-2.0', 'n_tokens_mistral': 187, 'n_tokens_neox': 173, 'n_words': 35, 'path': 'chapter_02/01_selection_sort.ipynb', 'repo_name': 'brianspiering/algorithm_design_manual_in_python', 'size': '488'}