two file into a single file
J. Clifford Dyer
jcd at sdf.lonestar.org
Mon Oct 29 11:40:43 EDT 2007
You will need to use the open() builtin for each input file, and again for the output file. Documentation is available in the python tutorial here:
http://docs.python.org/tut/node9.html#SECTION009200000000000000000
You should read also the whole tutorial, and work with it until you understand it, but for now, that section should get you going.
Cheers,
Cliff
On Mon, Oct 29, 2007 at 09:02:30PM +0530, Beema shafreen wrote regarding two file into a single file:
> Delivered-To: python-list at bag.python.org
> Date: Mon, 29 Oct 2007 21:02:30 +0530
> From: "Beema shafreen" <beema.shafreen at gmail.com>
> To: python-list at python.org
> Subject: two file into a single file
> Precedence: list
> List-Id: General discussion list for the Python programming language
> <python-list.python.org>
> List-Unsubscribe: <http://mail.python.org/mailman/listinfo/python-list>,
> <mailto:python-list-request at python.org?subject=unsubscribe>
> List-Archive: <http://mail.python.org/pipermail/python-list>
> List-Post: <mailto:python-list at python.org>
> List-Help: <mailto:python-list-request at python.org?subject=help>
> List-Subscribe: <http://mail.python.org/mailman/listinfo/python-list>,
> <mailto:python-list-request at python.org?subject=subscribe>
> Errors-To: python-list-bounces+jcd=sdf.lonestar.org at python.org
>
> hi everybody,
> I have a two file,
> file 1:
> 100007097
> 100007186
> 10000723
> 100007895
> 100007906
> 100008295
> 100008311
> 10000880
> 100009160
> 100009629
> file 2:
> 100007097
> 100007186
> 10000723
> 100007895
> 100007906
> 100008295
> 100008311
> 10000880
> 100009160
> 100009629
> how do i make into a single file......like this
> file 1 file 2
> 100007097 100007097
> 100007186 100007097
> 100007186 10000880
> 10000723 100007895
> 100007895 100007895
> 100007906 100007895
> 100008295 00008311
> 100008311 1000088
> --
> http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list