From 096d607b09097a96d72fabe02f81199427ceac40 Mon Sep 17 00:00:00 2001 From: Warren Hoburg Date: Sun, 7 Jan 2024 20:02:35 -0600 Subject: [PATCH] fstrings --- docs/source/examples/x_greaterthan_1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/examples/x_greaterthan_1.py b/docs/source/examples/x_greaterthan_1.py index 074d04172..92ca1c6f5 100644 --- a/docs/source/examples/x_greaterthan_1.py +++ b/docs/source/examples/x_greaterthan_1.py @@ -17,5 +17,5 @@ sol = m.solve(verbosity=0) # print selected results -print("Optimal cost: %.4g" % sol["cost"]) -print("Optimal x val: %.4g" % sol["variables"][x]) +print(f"Optimal cost: {sol['cost']:.4g}") +print(f"Optimal x val: {sol['variables'][x]:.4g}")