title: Python3 - sanitizing user input passed to shell as parameter
body: <p>What is the recommended method of sanitizing user_input_parameter passed to the shell like</p>
  
  <pre><code>subprocess.Popen(['sudo', 'rm -rf', user_input_parameter])
  </code></pre>
  
  <p>The command should accept all parameters but malicious activies like breaking out of the command should be mitigated.</p>