format
floatの小数点桁数を指定する。
print('grand total ---> ', '{:.3f}'.format(grand_total_lat), '{:.3f}'.format(grand_total_lng))
上記の例では、2つのfloatデータを小数点以下3位まで表示する。
Since 2023/09/17
print('grand total ---> ', '{:.3f}'.format(grand_total_lat), '{:.3f}'.format(grand_total_lng))
上記の例では、2つのfloatデータを小数点以下3位まで表示する。