일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- kaggle
- DWG
- attribute
- Convert Sorted List to Binary Search Tree
- iterator
- Class
- shiba
- 프로그래머스
- 컴퓨터의 구조
- 109. Convert Sorted List to Binary Search Tree
- Protocol
- Decorator
- 시바견
- 43. Multiply Strings
- t1
- 30. Substring with Concatenation of All Words
- Regular Expression
- 315. Count of Smaller Numbers After Self
- Generator
- Substring with Concatenation of All Words
- Python
- concurrency
- 파이썬
- Python Code
- Python Implementation
- 운영체제
- 밴픽
- 715. Range Module
- data science
- LeetCode
Archives
- Today
- Total
Scribbling
Zip & Unpacking 본문
img0 = img1 = img2 = 'img'
cap0 = cap1 = cap2 = 'cap'
dataset = [(img0, cap0), (img1, cap1), (img2, cap2)]
list = [(1, 2), (3, 4), (5, 6)]
print(*list)
for x in zip(*list):
print(x)
print(*dataset)
imgs, caps = zip(*dataset)
print(imgs)
l1 = 'abc'
l2 = '123'
l3 = '가나다'
for pair in zip(l1, l2, l3):
print(pair)
'Computer Science > Python' 카테고리의 다른 글
Python: Dynamic attributes and properties (동적 속성과 프로퍼티) (0) | 2022.06.17 |
---|---|
Python: Concurrency with asyncio (asyncio 기반 비동기 프로그래밍) (0) | 2022.05.17 |
Python: Concurrency with Futures (0) | 2022.05.09 |
Python: Coroutines (0) | 2022.05.03 |
Python: Context Manager (0) | 2022.04.29 |