gradebook = [('Math 212', 'Linear Algebra', 'Fall 2012', 'B'), ('CS 130',
    'Python', 'Spring 2013', 'A')]
fieldwidths = 13, 19, 14, 1
for tup in gradebook:
    tup = (s.ljust(w, '.') for s, w in zip(tup, fieldwidths))
print('Class: {}Subject: {}Term: {}Grade: {}'.format(*tup))
How to print a list of tuples