mylist = [3, 2, 6, 7] answer = [] for i in mylist: if i%2 == 0: answer.append(i**2) # 들여쓰기를 두 번 함 answer = [ i**2 for i in mylist if i %2 == 0]