For loop in Python


#define array (you can also drop this directly into the for loop)
a = [1,2,3,4,5]
#loop through array, a
for i in a:
    #for each element i in array a, add 3
    k = i + 3
    #print result
    print(k)
else:
    #once loop is finished, print complete
    print('Complete')
4
5
6
7
8
Complete