Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Reading data from 2 different files and writing to a single file

Reply
Thread Tools

Re: Reading data from 2 different files and writing to a single file

 
 
Chris Angelico
Guest
Posts: n/a
 
      01-30-2013
On Wed, Jan 30, 2013 at 9:43 PM, inshu chauhan <(E-Mail Removed)> wrote:
> I actually dont want nested loops but cant find another way to achieve what
> I want, But for these files I am sure that they have equal lengths, thats
> why I am taking the risk of using nested loops.. Can you suggest any
> different way to go around this problem , which could be flexible and
> non-errorneous ?


Easy. Just trim off the header row(s), if you know how many to expect,
and then use zip() as Dave mentioned earlier.

ChrisA
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Reading data from 2 different files and writing to a single file Chris Angelico Python 0 01-28-2013 02:49 PM
Re: Reading data from 2 different files and writing to a single file Dave Angel Python 0 01-28-2013 02:37 PM
Re: Reading data from 2 different files and writing to a single file Chris Angelico Python 0 01-28-2013 02:19 PM
Re: Reading data from 2 different files and writing to a single file Dave Angel Python 0 01-28-2013 02:05 PM
Re: Reading data from 2 different files and writing to a single file Chris Angelico Python 0 01-28-2013 01:43 PM



Advertisments