
lowtiersubhuman
Apricot
- Joined
- Jun 7, 2025
- Posts
- 4,394
- Reputation
- 4,104
# Generate a text file counting from 1 to 1,000,000 (one per line)
output_path = "/mnt/data/count_1_to_1000000.txt"
with open(output_path, "w") as f:
for i in range(1_000_000):
f.write(f"{i+1}\n")
# Verify the number of lines
line_count = sum(1 for _ in open(output_path, "r"))
line_count
output_path = "/mnt/data/count_1_to_1000000.txt"
with open(output_path, "w") as f:
for i in range(1_000_000):
f.write(f"{i+1}\n")
# Verify the number of lines
line_count = sum(1 for _ in open(output_path, "r"))
line_count