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

Discussion in 'Python' started by Chris Angelico, Jan 30, 2013.

  1. On Wed, Jan 30, 2013 at 9:43 PM, inshu chauhan <> 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
    Chris Angelico, Jan 30, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Angelico
    Replies:
    0
    Views:
    130
    Chris Angelico
    Jan 28, 2013
  2. Dave Angel
    Replies:
    0
    Views:
    127
    Dave Angel
    Jan 28, 2013
  3. Chris Angelico
    Replies:
    0
    Views:
    132
    Chris Angelico
    Jan 28, 2013
  4. Dave Angel
    Replies:
    0
    Views:
    126
    Dave Angel
    Jan 28, 2013
  5. Chris Angelico
    Replies:
    0
    Views:
    129
    Chris Angelico
    Jan 28, 2013
Loading...

Share This Page