title: Adding comma in all the rows except last row in python csv reader?
body: <p>I need to add a comma mark in all the rows of a csv file except the last row in python. I have tried but comma mark is also added in the last row. How to discard comma mark in the last row of the csv file? </p>
  
  <p>I am reading the csv file which is having almost 3000 rows and 2 columns (I am appending each merged row (for 2 columns) within inverted comma marks. I have tried but st-rucking. Any help is deeply appreciated.</p>
  
  <p>The code:</p>
  
  <pre><code>import csv, string, nltk
  def process_rs():
      with open('rs1.csv') as f:
         reader = csv.reader(f)
         next(reader, None)
         global raw_text
         with open('raw_reqs.txt', 'w', encoding = 'utf-8') as f1:
            for row in reader:
                raw_text = ('"'+' '.join(row)+'.'+'"'+', ')
                f1.write(raw_text)
                print(raw_text)
  process_rs()
  </code></pre>