On Nov 7, 7:17 pm, Peng Yu <pengyu...@gmail.com> wrote:
> It seems that int() does not convert '1e7'.

Because 'e' isn't a valid character in base 10.

> I'm wondering what
> function to use to convert '1e7' to an integer?
>
> >>> int('1e7')

>>> int(1e7)
10000000


>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ValueError: invalid literal for int() with base 10: '1e7'

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to