If you work with strings in your Python scripts and you're writing obscure logic to process them, then you need to look into regex in Python. It lets you describe patterns instead of writing ...
Apple's autocorrect on iPhone and iPad always aims to help when you're typing a message, but it's by no means perfect, and some of the replacements it continually spews out can be frustrating.