TIP:
个人喜好把变量命名为num、aimnum、loopnum、aim之类的,可自行改名
第二题
import random
arr =[]
loopnum =0
while loopnum <= 9:
num = random.randint(1,1001)
arr.append(num)
loopnum = loopnum +1
print(arr)
del arr[4]
print(arr)
arr.insert(4, 2428)
print(arr)
原文地址:https://www.cnblogs.com/KamanFuture/p/12152372.html
时间: 2024-10-28 13:20:37