title: Execute a string as a command
body: <p>Is there a way to take a string and use it as a command in Python?</p>
  
  <p>Something similar to the example shown below.</p>
  
  <pre><code>x = "import time"
  
  x
  
  time.sleep(1)
  </code></pre>
  
  <p>I know the example above won't work, that is just to help you understand what I am trying to do.</p>