代码:
array = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]
number_input = int(input('请输入一个正整数:'))
array.append(number_input)
array.sort()
print(array)
运行结果:
标签:39,int,排好序,number,数组,input,array,输入
来源: https://blog.csdn.net/run_noob_vip/article/details/123164270