【发布时间】:2013-10-12 02:29:35
【问题描述】:
所以,这是我的代码的 sn-p:
return "a Parallelogram with side lengths {} and {}, and interior angle
{}".format(str(self.base), str(self.side), str(self.theta))
一行中的良好样式超过了 80 个字符,所以我这样做了:
return "a Parallelogram with side lengths {} and {}, and interior angle\
{}".format(str(self.base), str(self.side), str(self.theta))
我添加了“\”来拆分字符串,但是当我打印它时出现了这个巨大的空白。
如何在不扭曲代码的情况下拆分代码?
谢谢!
【问题讨论】: