@cod1ng_together: How many Errors are Hiding in Your Log File? #python #coding #programming  Learn how to build a simple, reusable Python function that scans a log file and counts how many lines contain a specific keyword like "ERROR". A quick, practical trick for anyone working with log files.

Coding Together
Coding Together
Open In TikTok:
Region: DE
Monday 17 August 2026 17:00:53 GMT
2810
81
5
3

Music

Download

Comments

cnml.de
Michi :
You are reading the entire log file into memory just to count words. Instead just read the file line by line and increase the count. You can even do that with iterables. Instead of calling readlines just do sum(1 for line in file if keyword in line) directly.
2026-09-03 20:40:45
0
taquito3923
Taquito :
just use command line tools
2026-09-12 02:09:36
0
changgeme
𝖽𝖾𝗐 :
just grep it and wc -l
2026-08-19 23:58:35
0
voiding00
Raed :
grep "ERORR" error.txt | wc
2026-08-17 19:38:31
3
To see more videos from user @cod1ng_together, please go to the Tikwm homepage.

Other Videos


About