
[英]Python changing individual data types within a matrix/array - eg int, float, binary
[英]Changing INT within array to format with 2 decimal points python [closed]
print(f'[{datetime.now()}] => Current Price: {format(price,'.2f')} ID: {id} Item: {item}')
我目前在数组中有 Int,我想在 0 之前添加小数点以将其转换为浮点数。 前任。 12900
=> 129.00
, 9700
=> 97.00
但是当我运行我的代码时出现错误SyntaxError: f-string: unmatched '('
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.