import random
num_list = random.sample(range(1, 101), 10)
print('原始的10個數字為:')
$1
num1 = num_list.copy()
num1.reverse()
print('\n\n反向的10個數字為:')
for i in num1:
print(i, end = ' ')
print('\n\n最大的數:', max(num_list))
print('最小的數:', min(num_list))
print('\n總和:', sum(num_list))
print('平均:', sum(num_list) / len(num_list))
num1.sort(reverse = True)
print('數字從大到小排列:', end = '')
for i in num1:
print(i, end = ' ')
num_list.insert(2, 100)
del num_list[-1]
print('\n修改後的串列:', end = '')
for i in num_list:
print(i, end = ' ')