enumerate()enumerate() 함수는 반복문을 사용할 때 인덱스와 요소를 함께 반환해주는 함수이다. 주로 리스트나 튜플 등 이터러블을 반복할 때, 인덱스와 요소를 동시에 다루기 위해 사용된다. 기본 구문enumerate(iterable, start=0) iterable : 인덱스와 함께 반환할 대상(예: 리스트, 튜플, 문자열 등).start : 인덱스를 시작할 값 (기본값은 0). 사용 방법1️⃣ 리스트에서 인덱스와 요소 동시에 사용하기fruits = ["apple", "banana", "cherry"]for index, fruit in enumerate(fruits): print(index, fruit) 출력 결과0 apple1 banana2 cherry enumerate()는 fr..