Re: How convert string '1e7' to an integer?
by Thomas other posts by this author
Nov 8 2009 4:50AM messages near this date
Re: How convert string '1e7' to an integer?
|
Re: How convert string '1e7' to an integer?
Just a curiosity, why does Python do this?
> >> l = [(base, int('1e7', base=base)) for base in range(15,37)]
> >> l
[(15, 442), (16, 487), (17, 534), (18, 583), (19, 634), (20, 687),
(21, 742), (22, 799), (23, 858), (24, 919), (25, 982), (26, 1047),
(27, 1114), (28, 1183), (29, 1254), (30, 1327), (31, 1402), (32,
1479), (33, 1558), (34, 1639), (35, 1722), (36, 1807)]
> >> l = ([base, int('1e7', base=base)] for base in range(15,37))
> >> l
<generator object at 0x027803A0>
> >>
--
http://mail.python.org/mailman/listinfo/python-list
Thread:
Peng Yu
Christian Heimes
Thomas
Mick Krippendorf
Roel Schroeven
Benjamin Kaplan
Mrab
Ben Finney
Mensanator
Gary Herron
Mick Krippendorf
Tim Chase
|