【发布时间】:2022-11-27 05:36:46
【问题描述】:
所以,我正在玩 .csv 文件,学习如何阅读和呈现信息。我正在将结果打印到终端,但是当我打印更多内容时,我有一堵打印报表墙,而且越来越长。有什么办法可以清理这个吗?另外,请无视我的低俗数据。我在凌晨 3 点左右生成了那个 csv。
print("")
print(people[owner]["first_name"], end = "")
print(" ", end="")
print(people[owner]["last_name"], end="")
print(" owns the most buttplugs with a total of ",end="")
print(people[owner]["plugs"], end="")
print(" buttplugs!")
print("That's ",end="")
print(people[owner]["plugs"] - round(get_avg(people)),end="")
print(" more buttplugs than the average of ",end="")
print(round(get_avg(people)),end="")
print("!")
print("")
# Result: Sonnnie Mallabar owns the most buttplugs with a total of 9999 buttplugs!
# That's 4929 more buttplugs than the average of 5070
【问题讨论】:
-
你为什么说
Also, please ignore my vulgar data.而不是不发布低俗数据?
标签: python printing readability