1180: 字符串的查找删除
Memory Limit:32 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:56
Solved:11
Description
给定一个短字符串(不含空格),再给定若干字符串,在这些字符串中删除所含有的短字符串。
Input
输入只有1组数据。
输入一个短字符串(不含空格),再输入若干字符串直到文件结束为止。
输入一个短字符串(不含空格),再输入若干字符串直到文件结束为止。
Output
删除输入的短字符串(不区分大小写)并去掉空格,输出。
Sample Input Copy
in
#include
int main()
{
printf(" Hi ");
}
Sample Output Copy
#clude
tma()
{
prtf("Hi");
}
HINT
注:将字符串中的In、IN、iN、in删除。
lines = []
while True:
Python输入多行的字符串可以使用下面代码:
lines = []
while True:
try:
line = input()
lines.append(line)
except EOFError: # 检测到 EOF 结束输入
break