728x90
def solution(strlist):
answer = []
for i in strlist:
answer.append(len(i))
return answer
# 다른 사람의 풀이
# def solution(strlist):
# answer = list(map(len, strlist))
# return answer
728x90
'코딩테스트 > Python' 카테고리의 다른 글
프로그래머스 스쿨 - 배열의 유사도(Python) (0) | 2023.08.12 |
---|---|
프로그래머스 스쿨 - 배열 자르기(Python) (0) | 2023.08.11 |
프로그래머스 스쿨 - 배열 뒤집기(Python) (0) | 2023.08.09 |
프로그래머스 스쿨 - 문자 반복 출력하기(Python) (0) | 2023.08.08 |
프로그래머스 스쿨 - 몫 구하기(Python) (0) | 2023.08.07 |