如果我打印列表中包含的浮点数列表没有问题,但如果我只打印此列表列表中的一个浮点数,它不会打印所有数字!
listafeaturevector = [
[0.26912666717306399, 0.012738398606387012, 0.011347858467581035, 0.1896938013442868, 2.444553429782046]
,
[0.36793086934925351, 0.034364344308391102, 0.019054536791551006, 0.0076875387476751395, 3.03091214703604]
,
[0.36793086934925351, 0.034364344308391102, 0.019054536791551006, 0.0076875387476751395, 3.03091214703604]
,
[0.30406240228443038, 0.047100329090555518, 0.0049653458889261448, 0.0004618404341300081, 5.987025009738751]
]
for i in range (0,len(listafeaturevector)):
a = listafeaturevector[i]
print(a[0])
print(",")
print(a)
for j in range (0, len(a) ):
print(a[j])
这打印所有数字:
print(a)
这会打印部分数字:
print(a[0])