Skip to content

Commit 08ff000

Browse files
committed
updating to use f-strings
1 parent 2d69849 commit 08ff000

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/seesaw_ano_rotary_7segment_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@
5252

5353
if position != last_position:
5454
last_position = position
55-
display.print(" %s" % str(position))
55+
display.print(" {}".format(position))
5656
print("Position: {}".format(position))
5757
for b in range(5):
5858
if not buttons[b].value and button_states[b] is False:
5959
button_states[b] = True
6060
display.print(seven_segment_names[b])
61-
print("%s button pressed" % (button_names[b]))
61+
print("{} button pressed".format(button_names[b]))
6262

6363
if buttons[b].value and button_states[b] is True:
6464
button_states[b] = False
6565
display.print(" ")
66-
print("%s button released" % (button_names[b]))
66+
print("{} button released".format(button_names[b]))

examples/seesaw_ano_rotary_simpletest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
for b in range(5):
5555
if not buttons[b].value and button_states[b] is False:
5656
button_states[b] = True
57-
print("%s button pressed" % (button_names[b]))
57+
print("{} button pressed".format(button_names[b]))
5858

5959
if buttons[b].value and button_states[b] is True:
6060
button_states[b] = False
61-
print("%s button released" % (button_names[b]))
61+
print("{} button released".format(button_names[b]))

0 commit comments

Comments
 (0)