Assigning and Reassigning Types in Python | Part 4

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.


Share your love
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions or brave browser to block ads. Please support us by disabling these ads blocker.Our website is made possible by displaying Ads hope you whitelist our site. We use very minimal Ads in our site