@Divined
Code
s = "uuuuuuuuuuuuuuAuuuuuuuuuAuuuuuAu"
new_s = "\nA".join(s.split("A"))
print(new_s)
the output is:
Code
uuuuuuuuuuuuuu
Auuuuuuuuu
Auuuuu
Au
string.split("A") returns a list of strings separated by the given piece of text ("A" in this case)
string.join(list) joins list items by placing the string between them
Actually this way looks better to me, it uses regex pattern (r"A") instead which makes it easier to search for specific types of characters within the text, and it's just one function working on the string instead of splitting into a list and joining it again.
Code
import re
s = "uuuuuuuuuuuuuuAuuuuuuuuuAuuuuuAu"
new_s = re.sub(r"A", "\nA", s)
print(new_s)