participants = ["김철수:자유형", "이영희:평영", "박지민:자유형", "최하늘:접영"]
answer = []
for p in participants:
if "자유형" in p:
name = p.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: