Q. What would be the output of following code?


a = 9000 # initializes and assigns value to variable
print ("Now it's a", type(a))
a = float(a)
print ("Now it's a", type(a))
a = str(a)
print("Now it's a", type(a))

Answer :-

Output :-

Now it's a <class 'int'>
Now it's a <class 'float'>
Now it's a <class 'str'>
>>>

1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post