๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
โœ’๏ธ Coding Test Preparation/CodeUp

[CodeUp] 6023 : ์‹œ๋ถ„์ดˆ ์ž…๋ ฅ๋ฐ›์•„ ๋ถ„๋งŒ ์ถœ๋ ฅํ•˜๊ธฐ

by A Lim Han 2023. 6. 30.

๐Ÿ˜ฐ 6023 : ์‹œ๋ถ„์ดˆ ์ž…๋ ฅ๋ฐ›์•„ ๋ถ„๋งŒ ์ถœ๋ ฅํ•˜๊ธฐ

 

s = input()
a = []

for i in range(len(s)):
    if s[i] == ':':
        a.append(s[i+1])
        a.append(s[i+2])
        break


# ๋ฆฌ์ŠคํŠธ a์—์„œ ':' ์ œ์™ธ
a = [x for x in a if x != ':']

# ๊ณต๋ฐฑ์—†์ด ์ถœ๋ ฅ
print(a[0], end="")
print(a[1], end="")

 

-  ๊ณต๋ฐฑ์—†์ด ์ถœ๋ ฅํ•˜๋ ค๋ฉด print()๋ฌธ ๋’ค์— end="" ์ถ”๊ฐ€