I have 2 different text files.
File1.txt contains:
file
RAMPython
parser
File2.txt contains:
file1234
program
I want to perform an union of these both files such that i get an output
file3.txt which contains:
file
RAMPython
parser1234
program
The program that i'm working on just combines
On 17/02/2014 09:07, Aaron Misquith wrote:
I have 2 different text files.
File1.txt contains:
|file
RAM
Python
parser|
File2.txt contains:
|file
1234
program|
I want to perform an union of these both files such that i get an output
file3.txt which contains:
|file
RAM
Python
parser
1234
Aaron Misquith wrote:
I have 2 different text files.
File1.txt contains:
file
RAMPython
parser
File2.txt contains:
file1234
program
I want to perform an union of these both files such that i get an output
file3.txt which contains:
file
RAMPython
parser1234
program
On 02/17/2014 10:07 AM, Aaron Misquith wrote:
I have 2 different text files.
File1.txt contains:
file
RAMPython
parser
File2.txt contains:
file1234
program
I want to perform an union of these both files such that i get an output
file3.txt which contains:
file
RAMPython
parser1234
program
On 17 February 2014 09:07, Aaron Misquith aaronmisqu...@gmail.com wrote:
The program that i'm working on just combines two files. Any help on
performing an union such that a keyword would not be repeated would be
appreciated.
Code:
with open(C:\\File1.txt) as fin1: lines = fin1.readlines()
On 17/02/14 10:29, spir wrote:
I want to perform an union of these both files such that i get an output
file3.txt which contains:
file
RAMPython
parser1234
program
I don't understand the logic of your union (???) at all. Is your
example correct?
It's an email formatting issue, I saw the
On 02/17/2014 06:12 AM, Oscar Benjamin wrote:
On 17 February 2014 09:07, Aaron Misquith aaronmisqu...@gmail.com wrote:
The program that i'm working on just combines two files. Any help on
performing an union such that a keyword would not be repeated would be
appreciated.
Code:
with
Aaron Misquith aaronmisqu...@gmail.com Wrote in message:
As two others have said, a set is the simplest solution to avoid duplicates.
There are other questions to ask, however. Primary is whether
order matters.
If it does not, then observe that list(set(mylist)) will produce a
list from a
On 02/17/2014 05:29 AM, spir wrote:
On 02/17/2014 10:07 AM, Aaron Misquith wrote:
I have 2 different text files.
File1.txt contains:
file
RAMPython
parser
File2.txt contains:
file1234
program
I want to perform an union of these both files such that i get an output
file3.txt which contains:
On 17 February 2014 13:16, Dave Angel da...@davea.name wrote:
On 02/17/2014 06:12 AM, Oscar Benjamin wrote:
Something like this:
with open(r'D:\file3.txt', 'r+') as fout:
keywords_seen = set()
for filename in r'C:\File1.txt', r'C:\File2.txt':
with open(filename) as fin:
Oscar Benjamin oscar.j.benja...@gmail.com Wrote in message:
On 17 February 2014 13:16, Dave Angel da...@davea.name wrote:
On 02/17/2014 06:12 AM, Oscar Benjamin wrote:
Something like this:
with open(r'D:\file3.txt', 'r+') as fout:
keywords_seen = set()
for filename in
11 matches
Mail list logo