题解 | #序列中删除指定数字#
序列中删除指定数字
http://www.nowcoder.com/practice/7bbcdd2177a445a9b66da79512b32dd7
BC124 序列中删除指定数字
思路:
step1:创建一个新列表,筛选打印;
代码如下:
n = input()
ls = list(map(int,input().split()))
m = int(input())
c = []
for i in ls:
if i != m:
c.append(i)
for i in c:
print(i,end=' ')