강의

멘토링

로드맵

Inflearn Community Q&A

songenie's profile image
songenie

asked

Python 100 Problem Solving with Examples Part 3

Minimum, algorithm, function

인덱스로는 왜 접근이 불까한가요?

Written on

·

177

0

    for i in lst:
        if i < tail:
            tail = i
 
    for lst[i] in lst:
        if lst[i] < tail:
            tail = lst[i]
 
 
해당 코드에서 lst[i]로 접근하면 실행이 안되는데
i도 결국 lst내 인덱스를 차례대로 도는거니,
lst[i]로 변경해도 가능한게 아닌가요?
python

Answer

This question is waiting for answers
Be the first to answer!
songenie's profile image
songenie

asked

Ask a question