| layout | post |
|---|---|
| title | Tip for writing large numeric values in code |
| date | 2019-01-10 15:24:51 +0530 |
It is difficult to read when a variable is having a large decimal value. Many
times I myself put finger on the screen and count the places to get an idea. In
this version, you can put _ for separating numbers for constructing more
readable value.
Below is the code used in the example
x = 1_00_00_00
print(x)