idea: the .= operator
so for example instead of writing:
messages[0]["text"] = messages[0]["text"].replace("foo", "bar")
you can just do:
messages[0]["text"] .= replace("foo", "bar")
(actually i submitted this to python-ideas in 2018 and it didnt get far, probably for the best)