-->
当前位置:首页 > 题库

PROGRAMMING:Remove element from list

Luz5年前 (2021-05-10)题库443
Delete all eligible values from the list.
###Input format:
Enter n to test n times. Each test:
First, enter 1 line of string (elements within the string are separated by spaces)
Then, enter the element X to be deleted.
###Output format:
Output each line string after deleting element X. If all elements are deleted, an empty line is output.
Note: there should be no extra spaces at the end of the line.
###Input example:
```in
five
1 1 1 2 1 2 1 1 1
one
1 1 1 2 2 2 1 1 1
two
ab ab ab cd cd de de
ab
1 1 1 1
one
x y x x x z
t
```
###Output example:
```out
2 2
1 1 1 1 1 1
cd cd de de
x y x x x z
```







answer:If there is no answer, please comment