1#!/usr/bin/python
2def deleteLine():
3 fn = 'myfile'
4 f = open(fn)
5 output = []
6 str="The string i wish to delete
7 for line in f:
8 if not line.startswith(str):
9 output.append(line)
10 f.close()
11 f = open(fn, 'w')
12 f.writelines(output)
13 f.close()
14deleteLine()
15