How can I replace the contents of strings with #
's in Python? Assume no comments, no multiple lines for one string. Like if there is a line in a python file:
print 'Hello' + "her mom's shirt".
This will be translated into:
print '#####' + "###############".
It's like a filter to deal with every line in a python file.
If you're using Python and the thing you're parsing is Python there's no need to use regexp since there's a built-in parser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With