Notice
                              
                          
                        
                          
                          
                            Recent Posts
                            
                        
                          
                          
                            Recent Comments
                            
                        
                          
                          
                            Link
                            
                        
                    IT 세계의 후아
[python]map 함수 본문
※ map(function, iterable)
iterable 데이터 요소들에 function을 적용
# 백준 10869
a, b = input("").split()
print(int(a) + int(b))
# map 활용
a, b = map(int, input().split())
print(a + b)
# 프로그래머스 lv0 배열 원소의 길이
["we", "are", ...] => [2, 3, ...]
def solution(strlist):
    return [len(i) for i in strlist]
    # return list(map(len, strlist))'Coding > Python' 카테고리의 다른 글
| [python]시간/분/초 변환 (0) | 2024.03.18 | 
|---|---|
| [python]bool 자료형/함수, 논리연산자 (0) | 2024.03.14 | 
| [python]sum (0) | 2024.03.14 | 
| [python]문자열 format, raw string (0) | 2024.03.14 | 
| [python]아스키코드 (0) | 2024.01.29 | 
