Introduction ????????
In this pos, Let’s how to assign and re-assign data types in python. Below is the video format of the post, Check it out ????????
Video ????
Assigning in Python
Take a look at the below example, Initially we have given a value for some_var and then the python saves in memory that some_var is value 10.
Then we enter line 2 that is some_var = some_var + 5, Usually python calculates from the right side of the equal symbol. So it adds 10 + 5 and saves in some_var.
Now, In line three we tell it to print the value of some_var.
Reassigning Data Types
Some time we need to change the data types in python, Take a look at the below example.