Let's say I have multiple strings:
string1 = "ab"
string2 = "db"
string3 = "eb"
How do I replace the same substring in all of them? Let's say I need to replace"b" with "c". I can sure do the following, but is there a neat one-line solution?
string1 = string1.replace("b", "c")
string2 = string2.replace("b", "c")
string3 = string3.replace("b", "c")
strings = [string.replace("b", "c') for string in strings]