title: Merging a string splitted by space in Python
body: <p>I have a part of code like this:</p>
  
  <pre><code>for line in response.body.split("\n"):
      if line != "": 
          opg = int(line.split(" ")[2])
          opc = int(line.split(" ")[3])
          status = int(line.split(" ")[5])
          if command == 'IDENTIFY':
              if opg==opcodegroupr and opc==opcoder:
                  if status=="0":
              IEEEAddrRemoteDev = line.split(" ")[6:14]
          ret['success'] = "IDENTIFY: The value is %s " % (IEEEAddrRemoteDev)
          self.write(tornado.escape.json_encode(ret))
          self.finish()
  </code></pre>
  
  <p>Variable 'line' is like this for example:</p>
  
  <pre><code>1363011361 2459546910990453036 157 0 17 0 209 61 0 0 0 0 0 0 0 0 0 0 0 0 0 201
  </code></pre>
  
  <p>I would for example take fields from 6 to 14 and "merging" each others to print IEEEAddrRemoteDev like a entire string. </p>
  
  <p>Is this </p>
  
  <pre><code>IEEEAddrRemoteDev = line.split(" ")[6:14] 
  </code></pre>
  
  <p>the correct way? If I write</p>
  
  <pre><code>print IEEEAddrRemoteDev
  </code></pre>
  
  <p>I don't obtain anything.</p>
  
  <p>There's something wrong...</p>