ebosetalee / 20-days-challenge

#20dayschallenge on python
6 stars 0 forks source link

3a - Combine two files #8

Closed jirevwe closed 4 years ago

jirevwe commented 4 years ago

Write a program to read two text files, line by line, concatenate each line for both files, and output the concatenated result to a third file.

Sample txt file (1)

if
you
let
and
go,
someone
will
be
smart
enough
to
catch
me
and
never
make
your
mistake

Sample txt file (2)

ever
do not
me
my friend
tonight,
, yes, someone
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
ever again.

Sample Output

if ever
you do not
let me
and my friend
go, tonight,
someone, yes, someone
will ... mhmmm ...
be ... mhmmm ...
smart ... mhmmm ...
enough ... mhmmm ...
to ... mhmmm ...
catch ... mhmmm ...
me ... mhmmm ...
and ... mhmmm ...
never ... mhmmm ...
make ... mhmmm ...
your ... mhmmm ...
mistake ever again.