If I have a series of python strings that I’m working with that will always take the form of
initialword_content
and I want to strip out the initialword portion, which will always be the same number of characters, and then I want to turn all instances of _ into spaces — since content may have some underscores in it — what’s the easiest way to do that?
Due to the initialword always has same number of character, so you can just get the suffix of the string. And use string.replace to replace all “_” into spaces.