我在使用Python 3.7.
我在第3行的代码工作正常,但是当我将基础公式插入第4行时,我的代码返回错误:
SyntaxError:f-string:mismatched'(','{'或'[' (错误指向第一个'('第4行'.
我的代码是:
cheapest_plan_point = 3122.54
phrase = format(round(cheapest_plan_point), ",")
print(f"1: {phrase}")
print(f"2: {format(round(cheapest_plan_point), ",")}")
Run Code Online (Sandbox Code Playgroud)
我无法弄清楚第4行有什么问题.