numbers = [1, 2, 3, 4, 5] ''' squared = [] for val in numbers: squared.append(val*val) ''' squared = [val*val for val in numbers] print(squared) words = ['t', "'t'", "This", "program", "removes", "all", "the", "words", "starting", "with", "'t'", "from", "the", "list"] non_t_words = [] for value in words: if not value.startswith('t'): non_t_words.append(value.upper()) non_t_words = [value.upper() for value in words if not value.startswith('t')] print(non_t_words)