value_format = '${:.2f}'.format
name_format = '{}:'.format
values_fmt = [value_format(val) for val in values]
names_fmt = [name_format(name) for name in names]
max_value_len = max(len(x) for x in values_fmt)
max_name_len = max(len(x) for x in names_fmt)
for name, val in zip(names_fmt, values_fmt):
    print('{:<{namelen}} {:>{vallen}}'.format(name, val, namelen=
        max_name_len, vallen=max_value_len))
Форматирование текста для выравнивания в Python 3.3 с помощью метода .format()