To clearly present your data without manipulating it, implicit concatenation allows you to:
number = ('73167176531330624919225119674426574742355349194934' '96983520312774506326239578318016984801869478851843' '85861560789112949495459501737958331952853208805511' #... )
Brackets are needed. Note that there are no commas, which means that Python treats them as a continuation of the same line.
Pros:
- It's clear.
- It looks pretty straightforward.
- It is easy to line up with the first line.
- Lining up for most IDEs is pretty easy to compose code.
- This avoids output ends that are considered bad.
- It is processed directly as a string once, without any manipulation and expenditure of clock cycles.
Con: Small noise from ' and () .
Then you can force the number to an integer (long integer in Python 2) with
number = int(number)
In python 3, all integers are long integers.
source share