simplest python equivalent to R's gsub : <p>Is there a simple/one-line python equivalent to R's <code>gsub</code> function?</p>

<pre><code>strings = c("Important text,      !Comment that could be removed", "Other String")
gsub("(,[ ]*!.*)$", "", strings) 
# [1] "Important text" "Other String"  
</code></pre>
