Does anyone know how to replace text in a string (Python) that is only between ( ) ? Example:
this is a string (replace the n here)
output:
this is a string (replace the p here) (turn the n into a p)
Conversation
This Tweet was deleted by the Tweet author. Learn more
Replying to
Need to take care with this one as replace() will affect all occurrences of x in srcstr, even ones that are not within parentheses!
1
Replying to
With your kind of data, be careful with emoticons. (If you know what I mean. :-) )


