
Hey Everyone !!
I hope everyone must be doing great…
Moving ahead it’s time for the next topic comes under Python that is “Python Datatypes“.
Sounds familiar right? Yes cause we have already discussed it in the previous topic i.e Python Variables.
Just a quick recap we have seen over there that they are also some specific values that we can be store in the container or in the variable, from the example we took that the basket of fruits can have different kinds of fruits like apple, oranges, pinapples, cheerys whatever as per your space demand and the need.
So, what are those, the different kind of fruits are nothing but the as Dataypes, and such datatypes that python supports are known as “Python Dataypes”.
Like we have discussed earlier we don’t have to decalre the datatypes before its usauage, it’s something that the python languauge does it for us.
One of the big advantage of it that no more we have to be worried about the storage cause previously in the other programming languauges we were not sure about the the reuirement of the memory as per the need which lead us to waste the ample amount of memory already.
So to prevent this here we are with the python languauge which saves us from wasting the extra memory.
let’s take one example:
>>> a=5
>>> type(a)
output will be class<int>
– type() is the function which tells us about the type of the varibale means that it tells us about the what kind of fruit is their in the basket.
another exmples:
>>> a=5.0
>>> type(a)
output- class <float>
similarly for other datatypes.
Different types of Data-Types available are:
> Text type: str
> Numeric type: int, float, complex
> Sequence types: list, tuple, range
> Mapping type: dict
> Set type: set, frozenset
> Boolean type: bool
NOTE: these are the very necessary and basic datatypes which everyone should know.
We look upon each other thoroughly the way we will be moving forward
Keep coding keep winning 🚴







