>>> 42, 052, 0x2a, 42l, 052l
(42, 42, 42, 42L, 42L)
>>> 0.2, .8,4.,1.e3
(0.20000000000000001, 0.80000000000000004, 4.0, 1000.0)
>>> z=3-2j
>>> z.real, z.imag
(3.0, -2.0)
>>> abs(22), divmod(23,4.), hex(42), oct(42), ord('a'), round(123.456, 2)
(22, (5.0, 3.0), '0x2a', '052', 97, 123.45999999999999)
>>> cmp(4,3), coerce(4,3.)
(1, (4.0, 3.0))
>>> float('3.14'), int('42', 16), pow(5,3,2)
(3.1400000000000001, 66, 1)
>>> import math;import cmath;import random
>>> math.pi, random.random()
(3.1415926535897931, 0.039060765533527775)
>>> cmath.acos(3)
-1.7627471740390861j
(42, 42, 42, 42L, 42L)
>>> 0.2, .8,4.,1.e3
(0.20000000000000001, 0.80000000000000004, 4.0, 1000.0)
>>> z=3-2j
>>> z.real, z.imag
(3.0, -2.0)
>>> abs(22), divmod(23,4.), hex(42), oct(42), ord('a'), round(123.456, 2)
(22, (5.0, 3.0), '0x2a', '052', 97, 123.45999999999999)
>>> cmp(4,3), coerce(4,3.)
(1, (4.0, 3.0))
>>> float('3.14'), int('42', 16), pow(5,3,2)
(3.1400000000000001, 66, 1)
>>> import math;import cmath;import random
>>> math.pi, random.random()
(3.1415926535897931, 0.039060765533527775)
>>> cmath.acos(3)
-1.7627471740390861j
Comments
Post a Comment