파이썬 zip()

(Python zip()에서 넘어옴)

1 개요[편집]

Python zip()
numbers = [1, 2, 3]
strs = ['one', 'two', 'three']
result = zip(numbers, strs)
print( result )
# <zip object at 0x7f3f0af69788>

resultSet = set(result)
print( resultSet )
# {(2, 'two'), (3, 'three'), (1, 'one')}
Python 2
a = [1,2,3]
b = [4,5,6]
print( zip(a,b) )
# [(1, 4), (2, 5), (3, 6)]

2 같이 보기[편집]

3 참고[편집]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}