operate on a list in a pythonic way when output depends on other elements,"['*abc', '*de', '*f', '*g']"