for row in range(1, 6): line = "" for col in range(1, 6): line = line + str(row * col) + "\t" print(line)