5 ms·
You could have the same behavior by enforcing + operation in between mylongstring = "hello" + "world" No idea if python's way of indentations allows thi
by shultays 5y ago
You could have the same behavior by enforcing + operation in between
mylongstring = "hello" +
"world"
No idea if python's way of indentations allows this but sounds like it should
- ReleaseCandidat 5y agoNo, it doesn't: mylongstring = ("hello" + "world") or, without `+` mylongstring = ("hello" "world")
- fragmede 5y agoUse \ mylongstring = "hello " \ "world " \ "my " \ "name " \ "is"*
- BeetleB 5y agoThe use of \ is discouraged in Python. From PEP8: > 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.
- contravariant 5y agoSee I knew Python just wants to be more like lisp.
- deleted 5y ago[deleted]