title: Reading a line of integers in Python
body: <p>I am beginner in Python and I am solving a question at CodeChef where I have to read a line of space separated integers. This is what I am doing:</p>
  
  <pre><code>def main():
  
    t=int(raw_input())    #reading test-cases
  
    while t!=0:
      n, k=raw_input().split()    #reading a line of two space separated integers
      n, r=int(n), int(r)    #converting them into int
      list=[]
      #reading a line of space separated integers and putting them into a list
      list[-1:101]=raw_input().split()   
  </code></pre>
  
  <p>Now I to convert each element in the list to integer. Is there some better way to to do this? Please suggest an online resource where I can play with Python and learn tips and tricks!</p>