title: Forming a list of indexes of another list, depending from the input values
body: <p>Stackoverflow, hello</p>
  
  <p>I have a task to form a list of indexes of variables from initial list depends from the input values:</p>
  
  <pre><code>initial_list=['a', 'b', 'c']
  desired_index_variable=[str(i) for i in input('Input desired indexes with space between ').split()]
  try:
      for element in initial_list:
          final_list=[]
          desired_index=final_list.append(initial_list.index(element))
          print (desired_index)
  except ValueError:
      print ('No such element in initial list')
  </code></pre>
  
  <p>Here is my try to form such type of list, but the result is (I don't uderstand why there are three "Nones" either):</p>
  
  <pre><code>Input desired indexes with space between a b
  None
  None
  None
  </code></pre>
  
  <p>However, the required result is:</p>
  
  <pre><code> [0, 1]
  </code></pre>
  
  <p>By my new-user logic my program is brilliantly OK, but the Python says that it's not, evidently =(</p>