Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
output.write('{:>10}'.format(line[39:49]))
これはまだ左寄せの出力を提供しています。私は何が間違っているのですか?
I take a random guess at what your problem might be. Does
output.write('{:>10}'.format(line[39:49].strip())) # ^^^^^^^^
produce the desired output?