3 ms·
Yes, it gives an error -- if you want decimals, you can't use leading 0's: Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)]
by dr_zoidberg 5y ago
Yes, it gives an error -- if you want decimals, you can't use leading 0's:
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: 01
File "<ipython-input-1-3351d58b1d3b>", line 1
01
^
SyntaxError: invalid token
In [2]: 0o1
Out[2]: 1
In [3]: 0o10
Out[3]: 8