-
가운데 글자 가져오기프로그래밍/알고리즘 2021. 6. 20. 01:01
def solution(word): length = len(word) if length % 2 == 1: return word[length // 2] else: return word[length//2 - 1 : length//2 + 1]
'프로그래밍 > 알고리즘' 카테고리의 다른 글
[Programmers, Python] 평균 구하기 (0) 2021.06.03 Baekoon 10172번 / 개 (0) 2021.04.30 Baekjoon 10171번 / 고양이 (0) 2021.04.29 Baekjoon 10718 / We love kriii (0) 2021.04.28 [파이썬][알고리즘] Palindrome(회문) 구현 (0) 2021.01.06