** * This article is from Udemy "[Introduction to Python3 taught by active Silicon Valley engineers + application + American Silicon Valley style code style](https://www.udemy.com/course/python-beginner/" Introduction to Python3 taught by active Silicon Valley engineers + application + American Silicon Valley style code style ")" It is a class notebook for myself after taking the course of. It is open to the public with permission from the instructor Jun Sakai. ** **
According to the rules, if one line exceeds 80 characters, you must go to the next line. But usually it should be easy to see before going there.
new_line
t = 'aaaaaaaaaaaaaaaaaaaaaaa'
+ 'bbbbbbbbbbbbbbbbbb'
print(t)
result
File "/Users/fumiya/PycharmProjects/python_programming/lesson.py", line 2
+ 'bbbbbbbbbbbbbbbbbb'
^
IndentationError: unexpected indent
\
new_line
t = 'aaaaaaaaaaaaaaaaaaaaaaa' \
+ 'bbbbbbbbbbbbbbbbbb'
print(t)
result
aaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbb
\
means "this line isn't over yet".
()
new_line
t = ('aaaaaaaaaaaaaaaaaaaaaaa'
+ 'bbbbbbbbbbbbbbbbbb')
print(t)
result
aaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbb
You may do this.
Recommended Posts