Extracting and replacing elements that satisfy the conditions of a list (array) of strings in Python https://from-locals.com/python-list-str-select-replace/