Find and replace string values in list
Solution 1:
words = [w.replace('[br]', '<br />') for w in words]
These are called List Comprehensions.
Solution 2:
You can use, for example:
words = [word.replace('[br]','<br />') for word in words]
words = [w.replace('[br]', '<br />') for w in words]
These are called List Comprehensions.
You can use, for example:
words = [word.replace('[br]','<br />') for word in words]