title: How to use exec() with new lines in Python?
body: <p>I have a website that just sends a couple of lines of Python. I use requests to connect to this site and get it, but it has \n in it. Here is an example of what I mean:</p>
  
  <pre><code>import requests
  r = r.get("www.example.com")
  t = r.text
  exec(t)
  </code></pre>
  
  <p>The variable t has new lines. Here is the error:</p>
  
  <pre><code>&gt;&gt;&gt; exec(t)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "&lt;string&gt;", line 1
      import time\nprint(time.time())
                                ^
  SyntaxError: unexpected character after line continuation character
  </code></pre>
  
  <p>Another thing: On the webpage that it is retrieved from, it is a \n, but the value of t had \n rather than \n. I am not sure what I can do to fix this.</p>