Eh thought you had 1 more hours. You should always check your variable. The variable "i" was used in the most left indent. This was consider a global variable to the function. If you print(i) that was the last data that was used. It should of been:
print('%-30s' % (a[4]+ ','+' '+a[3]), '%30s' % a[0], '%30s' % a[1], '%30s' % a[2])
When my code doesn't work I don't know why **think** and when my code works I don't know why **think**