Python: type() .__name__ Example
# String
var = "Hello Python"
# Get name of type
type_name = type(var).__name__
# Print
print(type_name)
Output:
str
# String
var = "Hello Python"
# Get name of type
type_name = type(var).__name__
# Print
print(type_name)
Output:
str