title: How to load text file in python?
body: <p>I have a text file like this:</p>
  
  <pre><code>[0.52, '1_1man::army'], stack 
  [0.45, '3_3man::army'], flow
  [0.52, '1_1man::army'], testing 
  [0.52, '2_2man:army'], expert
  </code></pre>
  
  <p>How can I load into the file and print all the values for </p>
  
  <pre><code>'1_1man::army', '3_3man::army', '1_1man::army' and '2_2man:army'
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>text = open("text.txt", "r").readlines()
  print(text[1])
  </code></pre>
  
  <p>Then to implement the solutions some good people have shared. I cant use their codes since the file I have now is different from the one I posted(I wish to try out this new example).</p>
  
  <p><a href="https://stackoverflow.com/questions/52035779/how-can-i-arrange-the-list-according-to-similar-item-in-certain-location/52037806#52037806">How can I arrange the list according to similar item in certain location</a></p>