python用于行间距
with open('wordlist.txt') as lines:
for line in lines:
print(line)
当我运行程序时,我得到以下输出:
zeppelin
zero
zestfully
zesty
zigzagged
zipfile
zipping
zoom
有什么办法可以消除行之间的间距吗?
回答
尝试:
with open('wordlist.txt') as lines:
for line in lines:
print(line.rstrip())