python - How to multiple functions with data file -


I have been able to create the output for file extraction and file, but how do I add more files to the file? This code is:

  f = open ('input.csv', 'r') f2 = open ('output.txt', "w +") line = f.readlines () Lines in lines for: word = line split ("|") f2.writelines (word [5] + "|" + "\ n") f.close () f2.close ()  

(Before processing the output, there is a need to check and remove the empty space in the input file, duplicate need to be checked before processing the output, before removing some matching line before processing the output I need input)

I have input L'is

Hello | One | Good Bad | Weird | Man | World |

Hello. One | Good Bad | Weird | Man | World |

<|

Man |

ladie |

blank lines and duplicates before writing it to the output file Will remove. What type of matching lines do you want to remove? Framesline () line for lines in line lines = lines (= 'input.cxt', 'r') f2 = open ('output.txt', 'w') =

  f = open (= 'input.csv' Set (lines): if line! = '\ N' and row! = "|| Remove me ||| \ n": f2.writelines (line) f.close () F2.close ()  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -