The output for type(10) is int. The output for print(type(10)) is <class 'int'>.
Is there a way of printing only the datatype in Python?
You can get the __name__ attribute of the class:
__name__
print(type(10).__name__)
Output:
int
1.4m articles
1.4m replys
5 comments
57.0k users