Skip to content

Commit 4aad5ab

Browse files
committed
building counter function
1 parent a082839 commit 4aad5ab

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

  • implement-shell-tools/wc

implement-shell-tools/wc/wc.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,17 @@
102102
parser.add_argument("paths", help="The file(s)/path(s) to read from", nargs="+")
103103

104104
args = parser.parse_args()
105+
106+
def counter(item):
107+
lines = len(item.trim().split("\n"))
108+
words = item.split()
109+
110+
111+
112+
for path in args.paths:
113+
with open(path, "r") as f:
114+
content = f.read()
115+
if args.l:
116+
117+
118+

0 commit comments

Comments
 (0)