Hello and welcome to the ordeal on the data types in Python data types and classification of data that
tells the interpreter or the compiler how you want to use the data.
And every value in python has a data type
a data type in computing terms is a set of data values having predefined characteristics and examples
of data types include integers R I N T floating point numbers are flawed complex numbers strings are
SD are boolean coming to a data structure or data structure it is a collection of simple or primitive
data types.
Example lists set dictionaries tuples etc.
And yet some of the data types that are defined in Python integers loading by numbers complex numbers
come under the python numbers category like and mapped integers in computer programming are whole numbers
that can be positive negative or zero and an integer can also be known as an AI in D floating by numbers
represent negative and positive numbers with fractional but any number that you entered in the in python
will be interpreted as a number.
You're not required to declare what kind of data type your entering python will constitute any number
added in without the smells as an integer and any number added in with decimals as a flaw.
Unlike other programming languages Python has no command for declaring a variable.
So for example in C or C++ you was declared or defined a variable whereas in Python you can directly
assign or value to the variable and if you want to display the variable use the print function in the
Python programming language.
The variables are fine does.
So what does this mean.
That means the variable e that we have declared here acts as a pointer which binds to a specific memory
location that contains D value to.
So as you can see here the variable a is pointing to the memory location which contained the value to
now.
If I change the value of the way you build a tool say for example be equal to 10 in that case.
Now the variable is not binding and devalued too but since we have assigned value 10 to a it does no
pointing to the memory location which contains this particular value.
We can also assign a string value to the variable A.
In that case the pointer a bind to the memory location containing that particular string.
Say for example I assign devalue the string next to the pointer a so the pointer a.
Now points to the memory location containing the string text and how do we know that memory location
changes if we assign a different value to the word event.
For that we can use the python built in function.
I d and you pass in the object the bad and this is so loud let so open the GOP download book app and
test the functionality
so here is the Jupiter notebook book document and in the first two code saying assign value to the variable
e and in order to execute this score you need to hit shift into keys.
All right.
The first two code is executed.
Next we would like to know the the memory location with the object where value to install it again execute
the cell.
So this is the location where the pointer is pointing to not let us change the value or B again let's
assign the value sixty seven and then execute and again use the idea function to check the memory address.
So this is the memory address to which the pointer a is pointing to now now looked assign some text
execute the C shift and dirt and then use the idea function to see the memory location.
So this is a memory location that is pointing to now if you want to verify the data type of a particular
variable you can use the python built in function type.
So if you want to verify the data type of the variable C you can use the built in function type do you
IP and enter the object here.
So here you see that the variability is all from type Integer.
Let's now see the data type of variable e it is also or integer data type.
Let's check the data type of variable B so as you can see it of the data type is d odd with this string.