title: How do I shift all the next array values all back by one if the array before is blank?
body: <p>So I have lines in a text file that look like:</p>
  
  <pre><code> 108    abcdef.ghijkl.com   abcdef.ghijkl.com       NULL    NULL    NULL    4481104 Share   0   1       [abcdef.ghijkl.com] Failed to get CIFS shares with error code -2147024843.      Non-supported  share access type.   0   Unknown NULL    ntap
  </code></pre>
  
  <p>There's supposed to be a tab in between each value. However, if you scroll to the right, there's two tabs after <strong>4481104 Share   0   1</strong>. There are a bunch of lines that don't have this problem, but a few that do.</p>
  
  <p>How do I shift all the next array values all back by one if the array before is blank (get rid of that extra tab) so it looks like:</p>
  
  <pre><code> 108    abcdef.ghijkl.com   abcdef.ghijkl.com       NULL    NULL    NULL    4481104 Share   0   1   [abcdef.ghijkl.com] Failed to get shares with error code -2147024843.       Non-supported  share access type.   0   Unknown NULL    ntap
  </code></pre>
  
  <p>So far I've tried a bunch of things, including:</p>
  
  <pre><code>   for line in fp:
          line = line.strip()  # remove the newline
          if line.strip() == '':
              prev[4:] = prev[3:]
  </code></pre>
  
  <p>But that doesn't work (can't reassign strings). Would appreciate any insight, thank you.</p>
  
  <p><em>UPDATE</em>: Array example: </p>
  
  <blockquote>
    <p>[108, abcdef.ghijkl.com, abcdef.ghijkl.com, NULL, NULL,   , NULL,
    4481104, Share, 0, 1, '   ',[abcdef.ghijkl.com] Failed to get CIFS
    shares with error code -2147024843., Non-supported  share access
    type., 0, Unknown NULL, ntap]</p>
  </blockquote>
  
  <p>ALSO  there are two double tab parts, and I only want to get rid of one double tab.</p>