What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-18 01:07:13
python how to delete certain line number of file
#!/usr/bin/python def deleteLine(): fn = 'myfile' f = open(fn) output = [] str="The string i wish to delete for line in f: if not line.startswith(str): output.append(line) ... Add solution