大家好,所以我在这里有一个程序,让用户输入一系列数字,然后将其覆盖到列表中
total = int(input("How many numbers do you want to enter? "))
myList = []
for i in range (total):
n = int(input("Enter a number >> "))
myList.append(n)
print ("The list is")
for i in range(total):
print (myList[i])
它工作正常并且与程序的其余部分兼容,但我需要的是从 myList 创建一个新列表,但是新列表只能包含属于原始数据的 5%- 95% 子范围的数据
我不太确定该怎么做...使用 python 3.2.3 IDLE