Oscar Benjamin Wrote in message:
> On 17 February 2014 13:16, Dave Angel 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'
On 17 February 2014 13:16, Dave Angel 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:
>>
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:
Aaron Misquith 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 list without duplicate
On 02/17/2014 06:12 AM, Oscar Benjamin wrote:
On 17 February 2014 09:07, Aaron Misquith 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: lin
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 s
On 17 February 2014 09:07, Aaron Misquith 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()
> with open("C:
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
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
> parser12
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
prog
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 t
11 matches
Mail list logo