Iterating lists in Python for Dummies

Iqram Ali
2 min readNov 8, 2020

Forward and backward iterations in Python

Imagine your in a situation that needs to go through the elements of a list in backward order. To achieve this we need to read the last element first and then the last but one and so on till the element at index 0. Various python programming features can be used to achieve this.

Example

list = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri']
for i in range( 0, len(list)) :
print(list[i])

Output

Mon
Tue
Wed
Thu
Fri

--

--

Iqram Ali

Developer influencer, 15+ years in software development currently in engineering leadership role.