<jupyter_start><jupyter_text>数字全排列[![Author](https://img.shields.io/badge/Author-%40mjd507-important?style=social&logo=GitHub)](https://github.com/mjd507)[![WeChat Channel](https://img.shields.io/badge/Wechat-Daily%20Problem-important?style=social&logo=WeChat)](https://mp.weixin.qq.com/s/Yki68qlxES96tNEYIfMC7w)![Logo](img/Day85-1.png)　　给定一个整数数组，返回其全排列。<jupyter_code>def permute(nums: list) -> list:
    if len(nums) == 1:
        return [nums]
    result = []
    partion = permute(nums[1:])
    for item in partion:
        for i in range(len(nums)):
            combine = item[:i] + [nums[0]] + item[i:]
            result.append(combine)
    return result
print(permute([1, 2, 3]))<jupyter_output>[[1, 2, 3], [2, 1, 3], [2, 3, 1], [1, 3, 2], [3, 1, 2], [3, 2, 1]]
{'fraction_non_alphanumeric': 0.20833333333333334, 'fraction_numerical': 0.0546875, 'mean_word_length': 4.126666666666667, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '118191', 'license': 'MIT', 'n_tokens_mistral': 364, 'n_tokens_neox': 335, 'n_words': 49, 'path': 'April/Week13/Day85.ipynb', 'repo_name': 'Dragon1573/Daily-Problem', 'size': '768'}