21 lines
507 B
Python
21 lines
507 B
Python
import re
|
|
|
|
file_path = 'cologne_duesseldorf_data/duesseldorf_raw.txt'
|
|
|
|
try:
|
|
with open(file_path, 'r', encoding='utf-8') as f:
|
|
lines = f.readlines()
|
|
|
|
print(f"Total lines: {len(lines)}")
|
|
|
|
found_emails = 0
|
|
for i, line in enumerate(lines):
|
|
if "@" in line:
|
|
print(f"Line {i+1}: {line.strip()}")
|
|
found_emails += 1
|
|
|
|
print(f"Found {found_emails} lines with '@'")
|
|
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|