I have the following line inside a for loop (i.e. it's indented by 4 spaces):
abcdefgh_ijklm_nopqrstuvwxy = abcdefgh_ijklm_nopqrstuvwxy.append(abc_de)
The line is 80 characters long. How can I split it up so that it I do not get a 'Line too long' notification? Please note that I've changed the variable names for privacy reasons (not my code), but I can't modify the name of the variable, so naming it something shorter to fix the problem is not a viable option
As a secondary question, how would I split up a formatted string of the form:
data_header = f"FILE_{heading_angles}_{moment_of_inertia}_{mass_of_object}_{type_of_object}"
to span multiple lines? I already tried
data_header = f"FILE_{heading_angles}_{moment_of_inertia}_"
f"{mass_of_object}_{type_of_object}"
but that gives me an indentation error.
Any kind of help would be greatly appreciated!
Hope that these points answer your questions:
a = abcdefgh_ijklm_nopqrstuvwxy
b = abcdefgh_ijklm_nopqrstuvwxy.append(abc_de)
a = b
\) at the end of the line. For example:if a == True and \
b == False
Here is a link from another discussion on a similar matter.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With