Contenido del Curso
Tipos de Datos en Python
Tipos de Datos en Python
¿Mutable o Inmutable?
Los tipos de datos inmutables, como su nombre indica, no pueden modificarse una vez creados.
Por el contrario, los tipos de datos mutables son objetos que pueden modificarse una vez creados.
Immutable data types cannot be changed once they're created. In contrast, mutable data types can be altered after their creation.
To conclude, int
and float
are examples of immutable data types in Python. Reassigning a variable of these types does not alter their immutability.
Swipe to begin your solution
Imagine you are managing a budget for a small project. Initially, your available budget is set to $100. However, you receive an additional funding of $50. Update the value of the project_budget
variable to reflect the total available budget.
Once you've completed this task, click the button below the code to check your solution.
Solución
¡Gracias por tus comentarios!
¿Mutable o Inmutable?
Los tipos de datos inmutables, como su nombre indica, no pueden modificarse una vez creados.
Por el contrario, los tipos de datos mutables son objetos que pueden modificarse una vez creados.
Immutable data types cannot be changed once they're created. In contrast, mutable data types can be altered after their creation.
To conclude, int
and float
are examples of immutable data types in Python. Reassigning a variable of these types does not alter their immutability.
Swipe to begin your solution
Imagine you are managing a budget for a small project. Initially, your available budget is set to $100. However, you receive an additional funding of $50. Update the value of the project_budget
variable to reflect the total available budget.
Once you've completed this task, click the button below the code to check your solution.
Solución
¡Gracias por tus comentarios!