movie = ["김민수: 아바타", "이하늘: 타이타닉", "박지성: 아바타"] answer = [] for i in movie: if "아바타" in i: name = i.split(":")[0] answer.append(name) answer.sort() print(answer)
To embed this project on your website, copy the following code and paste it into your website's HTML: