The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation.
您可以将变量缩短到少于79个字符,也可以使用括号将其拆分为多行。你知道吗
您可以查看PEP-8样式指南here。
但是,如果您真正想要的只是缩短变量,可以尝试为变量选择一个较小的名称,或者删除每个逗号后面的空格。该行的当前长度是84,删除逗号将使其精确到79。这将使代码有点难看,但它会为你做的工作。你知道吗
我希望这有帮助。你知道吗
相关问题 更多 >
编程相关推荐