title: Python script to execute sed command for comparing 2 same log files but ignoring time stamp
body: <p>I have 2 log files that have same content but different time stamps. I need to compare the 2 files but ignore the time stamp of both files i.e first 20 characters. I have found the command as:</p>
  
  <pre><code>diff -I '^#' &lt;(sed -r 's/^((.){20})/#\1\n/' 1.log) &lt;(sed -r 's/^((.){20})/#\1\n/' 2.log)
  </code></pre>
  
  <p>But how do I write this command in python script?
  When I try to execute the above one, I get error as invalid command. I'm quite new to python so please go easy on me.</p>