にカンマの後に8桁を取得するが、私はすべてを試み、誰も解決策が実際に私の問題解決しない:コンマの後に8桁を取得するのpython
tab_freq=(result[1]/1e6)
value_freq=str(tab_freq)[1:-1]
print value_freq
を私が試したこの:
value_freq2=format(value_freq,".8f")
と私はいつも同じエラーが発生します:
Unknown format code 'f' for object of type 'str'
ありがとうございました!
https://stackoverflow.com/questions/455612/limiting-floats-to-two-decimal-points – Mukul215