python常用的数据类型

int_num = 7
float_num = 7.7
string = "python"
a, b, c = 7, 7.7, "python"
 
print(int_num, type(int_num))
print(float_num, type(float_num))
print(string, type(string))
print(a, b, c)
print("a=%.6f"%a)
print(len(c))

运行结果:

7 <class 'int'>
7.7 <class 'float'>
python <class 'str'>
7 7.7 python
a=7.000000

 

posted @ 2019-09-10 21:38  Jumpkin1122  阅读(158)  评论(0编辑  收藏  举报