첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
def GetTwiceValue(x): return x * 2

list1 = [1, 2, 3, 4]

list2 = list(map(GetTwiceValue, list1))

print(list2)

"""
[2, 4, 6, 8]
"""
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요