알고리즘
[프로그래머스] 가운데 글자 가져오기
hminor
2023. 6. 29. 08:42
반응형
def solution(s):
ln = len(s)
return s[ln//2] if ln%2 else s[ln//2-1:ln//2+1]