for i in range(10, 100): if i % 10 == 0: continue row = [] for j in range(2, 10): if str(i * j)[-2] == '0': row.append(f'{i} * {j} = {i * j}') if len(row) > 0: print(f'{i}: ' + ', '.join(row))