title: How to convert a string to list using python?
body: <p>I am working with RC-522 RFID Reader for my project. I want to use it for paying transportation fee. I am using python and used the code in: <a href="https://github.com/mxgxw/MFRC522-python.git" rel="nofollow noreferrer">https://github.com/mxgxw/MFRC522-python.git</a></p>
  
  <p>On python script Read.py, Sector 8 was read with the use of this code:</p>
  
  <pre><code># Check if authenticated
      if status == MIFAREReader.MI_OK:
          MIFAREReader.MFRC522_Read(8) &lt;---- prints the sector 8
          MIFAREReader.MFRC522_StopCrypto1()
      else:
          print "Authentication error"
  </code></pre>
  
  <p>The output of this was:</p>
  
  <pre><code>Sector 8 [100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  </code></pre>
  
  <p>So that last part(Sector 8 [100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), I convert it to string. I want that to be a list but I can't. Tried to put it on a variable x and use x.split() but the output when I execute print(x) is "None".</p>
  
  <pre><code>x = str(MIFAREReader.MFRC22_READ(8))
  x = x.split()
  print x #PRINTS ['NONE']
  </code></pre>
  
  <p>I want it to be like this: </p>
  
  <blockquote>
    <p>DATA = [100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]</p>
  </blockquote>
  
  <p>so that I can use the sum(DATA) to check for balance, and I can access it using indexes like DATA[0]</p>
  
  <p>Thanks a lot!!</p>