l = list()
with open('2.txt') as f:
for line in f.readlines():
l.append(line.replace('\n',''))
res = list()
with open('1.txt') as f2:
for line in f2.readlines():
res.append(line.replace('\n',''))
res = filter(lambda x: x.split('=')[-1] not in l, res)
with open('12.txt', 'w') as f2:
for line in res:
f2.write(line+"\n")
<source lang="html">
</source><snippet>
<content><![CDATA[
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>${1}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- css -->
<link rel="stylesheet" href="./css/${2}.css">
<link rel="shortcut icon" href="./img/favicon.ico">
</head>
<body>
<!-- headbar -->
<div class="header">
</div>
<!-- content -->
<div class="content">
<hr>
<footer class="footer">
</footer>
</div>
</body>
</html>
]]></content>
<tabTrigger>html</tabTrigger>
</snippet>