numbers = [1,2,3,4,5,6,7,8] greater_than_4 = [number for number in numbers if number > 4] def shorter_than_X(strings, max_length): return [string for string in strings if len(string) < max_length]