Skip to content

Commit 30a4949

Browse files
use enumerate
1 parent 57dd785 commit 30a4949

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cowsay/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ def wrap_lines(lines: list, max_width: int = 49) -> list:
2828
line_width = 0
2929

3030
# Loop over the characters in the line.
31-
for i in range(len(line)):
32-
33-
character = line[i]
31+
for i, character in enumerate(line):
3432

3533
if character in list(string.printable):
3634
# Half width characters.

0 commit comments

Comments
 (0)