From f061b21ec670ff51a08815f3678783ba4dbb24af Mon Sep 17 00:00:00 2001 From: FoamyGuy Date: Fri, 7 Feb 2020 19:13:32 -0600 Subject: [PATCH] fix the print string formatting --- examples/lsm303dlh_mag_compass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lsm303dlh_mag_compass.py b/examples/lsm303dlh_mag_compass.py index 9927228..56f811b 100644 --- a/examples/lsm303dlh_mag_compass.py +++ b/examples/lsm303dlh_mag_compass.py @@ -22,5 +22,5 @@ def get_heading(_sensor): while True: - print("heading: {.2f} degrees".format(get_heading(sensor))) + print("heading: {:.2f} degrees".format(get_heading(sensor))) time.sleep(0.2)