data = [
[2007, 27, 3.9, 5.0, -3.0, 0.1],
[2007, 28, 9.0, 7.3, -3.2, 0.0],
[2007, 29, 10.7, 9.9, -1.2, 0.0]
]
data = [[str(item) for item in row] for row in data]
col_widths = [max(len(row[i]) for row in data) for i in range(len(data[0]))]
output = []
for row in data:
output_row = " ".join(item.rjust(width) for width, item in zip(col_widths, row))
output.append(output_row)
print("\n".join(output))