title: python numbers in different sequence in file
body: <p>I am new to python and bash.</p>
  <p>I don't know what to really search up, so forgive me if this is a duplicate.</p>
  <p>I have a python file like this:</p>
  <pre><code>  if(word[3] == 'l' and 
      word[4] == 'e' and 
      word[1] == 'f' and 
      word[2] == 'i' and ):
  </code></pre>
  <p>And I would like to get the array in order. This of course can be done manually by mapping 1 to f, 2 to i, so on and so forth, but I would like to know how to do this with a bigger array, either in python or bash, it doesn't matter that much.</p>
  <p>Thanks in advance</p>