for files in what_in_dir:
o = open(i,'a')
data = open(i).read()
o.write( re.sub(r'^http://*$','',data) )
o.close()
clean_list = []
with open('input.txt', 'r', encoding="utf-8") as f_input:
for l in f_input:
if not l.startswith('http'):
clean_list.append(l)
with open('input.txt', 'w', encoding="utf-8") as f_out:
f_out.write('\n'.join(clean_list))