Dynamic Languages in Coding

A brief explainer on dynamic languages like Python — how variables can change type and value, and why you should usually avoid changing the type.

Dynamic languages, such as Python allow for variables to be updated or changed within the program.

This means you can change not only the value:

height = 60
height = 65

But you can also change the variable type:

height = 60
height = "sixty"

While it is possible to do this, best practice is to avoid changing the variable type. Instead, do the following:

height = 60
height_description = "sixty"