Programmer's World
1 subscriber
2 photos
1 link
Download Telegram
Today's lesson is : Type casting = the process of converting a variatile from one data type to another
str(), int(), float(), bool()


Executed Code 📱 :

name = "DevprintX"
age = 18
price = 10.99
is_student = True

print(type(name))
print(type(age))
print(type(price))
print(type(is_student))

output :

<class 'str'>
<class 'int'>
<class 'float'>
<class 'bool'>

the explanation :

DevprintX is #string (DevprintX)
the nember 18 is
#integer (18)
the nember 10.99 is
#float (10.99)
True is
#boolean (True)
Please open Telegram to view this post
VIEW IN TELEGRAM