title: Python -- Reading lines from file and split it
body: <p>I'm trying to split the lines from a .txt file stored locally. What I do to make a for loop but I want to start the loop on an specific index on the array. For example: </p>
  
  <pre><code>  file_content = open('files/filefinal1_test.txt')
    counter = 0
    total_lines = 0
    global l
    index = 0 if l == "" else file_content.index(l)
  
    for line in file_content[index:]: 
      l = line
      array_line =line.split('", "')
      array_line[0] = array_line[0].replace('"', '')
      array_line[1] = array_line[1].replace('"', '')
      array_line[2] = array_line[2].replace('"', '')
      array_line[3] = array_line[3].replace('"', '')
      if (send_req(papi, array_line) == 1): 
          counter = counter + 1 
      total_lines = total_lines + 1
  </code></pre>
  
  <p>This gives me errors at : file_content[index:] It's there any way to start the loop at specific line from the file_content?</p>
  
  <p>The fact it's that the code below works and loops the array :</p>
  
  <pre><code>for line in file_content: 
          l = line
          array_line =line.split('", "')
          array_line[0] = array_line[0].replace('"', '')
          array_line[1] = array_line[1].replace('"', '')
          array_line[2] = array_line[2].replace('"', '')
          array_line[3] = array_line[3].replace('"', '')
          if (send_req(papi, array_line) == 1): 
              counter = counter + 1 
          total_lines = total_lines + 1
  </code></pre>
  
  <p>Could anyone help me please?</p>