728x90
[1] Problem: https://py.checkio.org/en/mission/common-words/
[2] My solution
def checkio(line1: str, line2: str) -> str:
# your code here
line1 = line1.split(',')
line2 = line2.split(',')
result = []
for word in line1:
if word in line2: result.append(word)
return ",".join(sorted(result))
[3] Best solutions
728x90
'프로그래밍 문제 > [Python] CheckIO' 카테고리의 다른 글
[Check-IO] The Most Wanted Letter (0) | 2021.12.19 |
---|---|
[Check-IO] Follow Instructions (0) | 2021.12.18 |
[Check-IO] Sum by Type (0) | 2021.12.12 |
[Check-IO] Time converter (0) | 2021.12.10 |
[CheckIO] Goes Right After (0) | 2021.12.03 |
댓글