.. getthecode:: literals.py :language: python3 :hidden: =========== Litterals =========== This page contains a memo on litterals. .. code-block:: py3 from Tools import * Underscores in Numeric Literals ------------------------------- :frompy:`3.6` `PEP 515 - Underscores in Numeric Literals `_ .. code-block:: py3 a_int = 1_000_000_000_000_000 a_hex = 0x_FF_FF_FF_FF print(a_int, a_hex) .. code-block:: none 1000000000000000 4294967295 .. code-block:: py3 a_int = '{:_}'.format(1000000) a_hex = '{:_x}'.format(0xFFFFFFFF) print(a_int, a_hex) .. code-block:: none 1_000_000 ffff_ffff