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=' ')