Numeric Literals¶
Digit Separators¶
Use _ to separate digits in numeric literals for readability:
Underscores are ignored by the compiler. They do not affect the value.
Integer Literals¶
Float Literals¶
Use Cases¶
- Large constants:
1_000_000instead of1000000 - Grouping:
999_999for readability