Python is a dynamically typed language which means checking of the variable is done at the runtime. When an object is created in Python, memory is dynamically allocated to it. When the life cycle of the object ends, the memory is taken back from it. This memory management of Python makes the programs run more efficiently. Whereas in the static typed language the checking of the variables or any other is done at the compile time. In static typed languages once a variable is initialized to a data-type it cannot be assigned to a different type. Static typed languages are faster than dynamically typed languages. Dynamically typed language is easier to write as no need to initialize the type of the variable, but it also creates confusion while the code is revisited.
Comments are closed.