python获取变量的数据类型

有时候咱们须要知道variable的数据类型,在python中有内置函数type能够获取variable的数据类型python 1. 在console输入以下code:函数 id = 1code type(id)console 输出:<type 'int'>数据类型 2. 在console输入以下code:float id = 1L数据 type(id)di 输出:<type 'long'>co
相关文章
相关标签/搜索