Python: Replace text in a string

Straight forward snippet to replace some text within a string.

import string

string.replace("TAB", "A", "B")

This will produce "TBB"

[ Source ]

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog