Created
September 27, 2018 02:46
-
-
Save macagua/637116aec6892fa911c6522ada09c497 to your computer and use it in GitHub Desktop.
Uso tipado dinámico en Python 3.5.x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" El tipado dinámico significa que los objetos en tiempo de | |
ejecución (valores) tienen un tipo, a diferencia del tipado | |
estático donde las variables tienen un tipo. | |
>>> variable = 11 | |
>>> print ((variable), type(variable)) | |
<class 'int'> | |
>>> variable = "activo" | |
>>> print ((variable), type(variable)) | |
<class 'str'> | |
>>> | |
""" | |
variable = 11 # "variable" guarda un valor entero | |
print ((variable), type(variable)) | |
variable = "activo" # "variable" guarda un valor cadena | |
print ((variable), type(variable)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment