KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Predict the data type of the given Python statement:

p='10'
print(type(int(p)))

Python Functions

1 Like

Answer

Output
<class 'int'>
Explanation

The int() function converts the string '10' into an integer 10. Therefore, the data type returned by type(int(p)) is int.

Answered By

3 Likes


Related Questions