title: Reading a (compressed) file
body: <p>My code :</p>
  
  <pre><code>sent = str(input("Please input a sentence: "))
  dl = [0]
  
  for count , v in enumerate (splitsent):
  
      if splitsent.count(v) &lt; 2:
  
          dl.append(max(dl) +1) 
      else:
          dl.append(splitsent.index(v) +1)
  
  dl.remove(0)
  print(sent, "\n",dl)
  </code></pre>
  
  <p>gives the output :</p>
  
  <pre><code>"1,2,3,4,1,2"
  </code></pre>
  
  <p>with the input:</p>
  
  <pre><code>"To be or not to be"
  </code></pre>
  
  <p>This is it in it's "compressed" form. How would I take the output,"1,2,3,4,1,2" from an external file and turn it into the "To be or not to be"?</p>