Using python to merge two text files line for line
Hi
I'm a bit new to Python programming and hoped that someone might be able to help with a problem I'm having. What I essentially want to do is to combine two text files line for line. I know how to do this in a bash script so to give you a better idea here's the code for that: Code:
paste -d ';' file1 file2 > merged_file1_and_file2 dog cat sheep and file2 said: bark meow baa then running this command would create merged_file1_and_file2 which would be: dog;bark cat;meow sheep;baa The code I'm using at the moment is: Code:
What I'd like to do is something like: (pseudo code, I know it's not python ;-)) Code:
for each line in csvraw and stamps: TIA, Simplified. |
Sorted!
Just had an epiphany...
Code:
csvraw = open("csvfile.txt", "r") |
All times are GMT -5. The time now is 01:46 PM. |