PROGRESS
12 / 28
QUESTION 12 #682
문장에서 이미 본 글자가 또 나오면 건너뛰고, 처음 보는 글자만 출력합니다. 빈칸에 들어갈 알맞은 키워드를 채우세요.
main.py
string = "There is no place like home."
list1 = []
output = ""
for x in string :
if x in list1 :
else:
output = output + x
if x != " " :
list1.append(x)
print(string)
print(output)
HINT
continue는 현재 반복을 건너뛰고 다음 반복으로 넘어가는 키워드.
실행 결과 예시
There is no place like home. Ther is nopalkm.
INTERACTIVE SHELL
Shift + Enter 로 즉시 실행