Mar 29, 2023
Fair point, but I included 'for i in range(len(list))' as a teaching tool for beginners rather than the absolute most pythonic way to achieve something.
1. I usually get 'wtf?' reactions when I try to teach absolute beginners how to use enumerate
2. beginner learners usually understand 'range(len(list))' better, and this can be extended to 'range(len(list)-1' and so on
3. beginner learners that I teach usually use 'range(len(list))' first until some degree of comfort before evolving to use enumerate