Python Datatypes by SujithKumar from Sujith Kumar In this I would like to discuss about Python data types. Usually Python don't required any variable declarations with datatype but we should aware when we are dealing with the variable values and how it stores what type of data. Let's jump into our exploration on Python data types. Python Mutable vs Immutable datatypes In simple way to understand this using id() function that returns address of the variables. Mutable data type means the variable stores the data at one address even different operations (+,-,/,*,%) on the variable. The content of objects of immutable types cannot be changed after they are created. Mutable objects bytearray list set dict Immutable objects int float long complex str tuple frozen set Lets test a int data type and a list data type to evaluate the immutable values with int data type while doing arthematic operation on it. Similarly list example shows how mutable t...
Learn from the learners, learning is forever - Life is short it need Python programming !!!