File: numeric_literals.py

package info (click to toggle)
black 18.9b0-1-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,160 kB
  • sloc: python: 91,870; makefile: 32; sh: 2
file content (44 lines) | stat: -rw-r--r-- 620 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3.6

x = 123456789
x = 123456
x = .1
x = 1.
x = 1E+1
x = 1E-1
x = 1.00000001
x = 123456789.123456789
x = 123456789.123456789E123456789
x = 123456789E123456789
x = 123456789J
x = 123456789.123456789J
x = 0XB1ACC
x = 0B1011
x = 0O777
x = 0.000000006
x = 10000
x = 133333

# output


#!/usr/bin/env python3.6

x = 123_456_789
x = 123_456
x = 0.1
x = 1.0
x = 1e1
x = 1e-1
x = 1.000_000_01
x = 123_456_789.123_456_789
x = 123_456_789.123_456_789e123_456_789
x = 123_456_789e123_456_789
x = 123_456_789j
x = 123_456_789.123_456_789j
x = 0xB1ACC
x = 0b1011
x = 0o777
x = 0.000_000_006
x = 10000
x = 133_333