title: Python - line.split()
body: <p>Hi so I just started Python programming so be ready to see me alot around with alot of questions.
  First one, I'm making a small program that will go get informations from a .txt file I created in this format :</p>
  
  <p>10-50-100
  11-78-245
  12-123-354
  Etc ...</p>
  
  <p>If the user wants to go get the line that start with the "10". How can I go get it and return ALL the informations (10, 50 AND 100) ?
  When I use line.split(), it only returns me the first entry of the line ...</p>
  
  <p>This is my code :</p>
  
  <pre><code>levelChart = open("RunescapeLevelsChart.txt", "r")
  actualLevel = raw_input("Level : ")
  if actualLevel in open("RunescapeLevelsChart.txt").read() :
      actualLevelSplit = actualLevel.split()
      print actualLevelSplit
  else :
      print("Failed.")
  raw_input("End")
  </code></pre>
  
  <p>If I for example enter 10. I want the program to return me 10, 50 AND 100. But it only returns me 10. How do I correctly use the line.split() to make it returns all the values on the line ?</p>
  
  <p>Thanks !</p>