Skip to content

Commit a2c1bcf

Browse files
committed
Updating regex exercises
1 parent 5e2c359 commit a2c1bcf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

day2/regex_ex1a.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
for label, pattern in patterns.items():
1616
match = re.search(pattern, output)
1717
if match:
18-
print("\n{}: ".format(label))
19-
print("Packets: {}".format(match.group("pkts")))
20-
print("Bytes: {}\n".format(match.group("bytes")))
18+
print(f"\n{label}: ")
19+
print(f"Packets: {match.group('pkts')}")
20+
print(f"Bytes: {match.group('bytes')}\n")

0 commit comments

Comments
 (0)