Skip to content

Commit b41d36a

Browse files
committed
formati printing
1 parent cb49588 commit b41d36a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • implement-shell-tools/wc

implement-shell-tools/wc/wc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
total_lines +=lines_count
2323
total_bytes += bytes_count
2424
total_words +=words_count
25-
print(lines_count ,words_count , bytes_count, file)
25+
print(f"{lines_count:<5}{words_count:<5}{bytes_count:<5}{file:<20}")
2626
words_count=0
2727

28-
print(total_lines,total_words,total_bytes,"total")
28+
print(f"{total_lines:<5}{total_words:<5}{total_bytes:<5}total")

0 commit comments

Comments
 (0)