Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
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 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

해바라기찬

python enumerate 본문

python

python enumerate

김기찬이 2022. 1. 25. 18:30

lst = [1,2,3,4,5]

for i in enumerate(t):

   print(i)를 해보면

 

(0,1)

(1,2)

(2,3)

(3,4)

(4,5)

 

튜플형식으로 리턴 앞원소는 index 뒤원소는 index의 값

'python' 카테고리의 다른 글

python map함수  (0) 2022.03.25
list복사할때 주의점  (0) 2022.03.17
python sorted  (0) 2022.01.26
python dictionary  (0) 2022.01.26
python zip  (0) 2022.01.25