How can I get the string "Hello World" using a list of strings in the code below? I'm trying:
str1="HellXXo WoYYrld"
replacers = ["YY", "XX"]
str1.replace(replacers, "")
Which results in this error:
TypeError: replace() argument 1 must be str, not list
Any suggestion? Thanks in advance!