title: Python edit specific row and column of csv file
body: <p>I have some python code here with the aim of taking user input to target a specific row of a CSV and then to overwrite it if a certain letter matches.</p>
  
  <pre><code>import csv
  
  line_count = 0
  marked_item = int(input("Enter the item number:"))
  with open("items.csv", 'r') as f:
      reader = csv.reader(f, delimiter=',')
      title = next(reader)
      print(title)
      print(title[3])
      lines = []
      for line in reader:
          if title[3] == 'a':
              line_count += 1
              if marked_item == line_count:
                  title[3] = 'b'
          lines.append(line)
  with open("items.csv", 'w', newline='') as f:
      writer = csv.writer(f, delimiter=',')
      writer.writerow(title)
      writer.writerows(lines)
  </code></pre>
  
  <p>This code works almost the way I want it to but it is unable to edit any other row but the first. an example of the output this code is:</p>
  
  <pre><code>red,12.95,2,b #note, this change from 'a' to 'b'
  blue,42.5,3,a #How can I target this row and change it?
  green,40.0,1,a
  </code></pre>
  
  <p>the problem I then have it targeting another row like row 'blue,42.5,a'. My code is unable to target and then change the value 'a' to 'b'. </p>