Curso de Programación en Python/ConversionesNumericos
Ir a la navegación
Ir a la búsqueda
Funciones de Conversiones Númericos:
Function | Returns ( description ) |
---|---|
int(x) | convert x to a plain integer |
long(x) | convert x to a long integer en Python 2.x, NO en 3.x |
float(x) | convert x to a floating-point number |
complex(x) | convert x to a complex number with real part x and imaginary part zero |
complex(x, y) | convert x and y to a complex number with real part x and imaginary part y. x and y are numeric expressions |