python中为什么int(‘98.6’)会显示错误,而int(98.6)就可以?

python中为什么int(‘98.6’)会显示错误,而int(98.6)就可以?

int(float('98.6'))
这样写。

前面一个是字符型,int不能自动转换为整型,后面一个float可以