Python 的 类型检查
等级 117 次按键
这会打印3.14的类型,即<class 'float'>。type()函数显示值的数据类型。
Python 代码
# type()返回值的类型(类)# 3.14带有小数点,是float(浮点数),所以打印<class 'float'>1print(type(3.14))运行结果
<class 'float'>
可以用这段代码练习打字。成绩不会计入排行榜。
这段代码中的符号
这段 Python 代码中需要输入的符号及其出现次数。
(× 2)× 2.× 1