>>> list(filter(str.islower, 'aAbBcC')) ['a', 'b', 'c'] >>> list(filter(str.isupper, 'aAbBcC')) ['A', 'B', 'C'] >>>