Language/Python

[Python / 프로그래머스 level 1] 서울에서 김서방 찾기

ej503 2021. 7. 26. 15:08

def solution(seoul):
    i = 0
    for i in range(len(seoul)):
        if seoul[i] == 'Kim':
            i += 1
            return '김서방은 ' + str(i-1) + '에 있다'