Typecasting in Python | Python Tutorial - Day #9
In day # 9 too. . . . . . . . . Of 100 Days Of Code you're
maintaining consistency today I 'll tell you about 'Type Casting'
This may sound scary ' Type Casting' But let me tell you , this is
very simple Let 's suppose we created a 'String ' variable And
that variable contains `` 27 `` So if we want to tell Python that
the characters written in double-quotes ( `` `` ) is a valid number
So we can type caste it to an 'Integer' by using 'Int ' function ''
How can we do this ? '' We 'll learn in details in this video The
conversion of one data type into the other data type is known
as type casting or type conversion in python. Harry '' & Bhai ''
side-by-side. . . . Because this is what the concatenation of
strings takes place. Convert this in to an 'String' Convert this
into an 'Integer' Convert is a function which helps to convert
'Data Types ' into another. There are two type of 'Type Casting'
'Explicit ' & 'Implicit ' ' Explicit ' means I 'm doing it with my will '
Implicit ' means Python is doing that automatically. Explicit '
conversion means as a programmer I command Python
interpreter to convert a 'Data Type ' into another. Explicit
conversion is done via developer or programmer 's intervention
or manually as per the requirement.
In day # 9 too. . . . . . . . . Of 100 Days Of Code you're
maintaining consistency today I 'll tell you about 'Type Casting'
This may sound scary ' Type Casting' But let me tell you , this is
very simple Let 's suppose we created a 'String ' variable And
that variable contains `` 27 `` So if we want to tell Python that
the characters written in double-quotes ( `` `` ) is a valid number
So we can type caste it to an 'Integer' by using 'Int ' function ''
How can we do this ? '' We 'll learn in details in this video The
conversion of one data type into the other data type is known
as type casting or type conversion in python. Harry '' & Bhai ''
side-by-side. . . . Because this is what the concatenation of
strings takes place. Convert this in to an 'String' Convert this
into an 'Integer' Convert is a function which helps to convert
'Data Types ' into another. There are two type of 'Type Casting'
'Explicit ' & 'Implicit ' ' Explicit ' means I 'm doing it with my will '
Implicit ' means Python is doing that automatically. Explicit '
conversion means as a programmer I command Python
interpreter to convert a 'Data Type ' into another. Explicit
conversion is done via developer or programmer 's intervention
or manually as per the requirement.