Articles
What you're building
The even numbers filter is back. Same input, same output — but the function is now one line.
This is what comprehensions are for: replacing a loop-and…
The problem...
Every program you've written so far has the same limitation.
You run it. You enter data. It processes. It prints.
Then you close it — and everything is gon…
The idea
You have a file on your computer. Python needs to find it, open it, and read what's inside.
Three methods. One pattern. All the same with open() block.
Where to put yo…
The idea
Reading gets data out of a file. Writing puts data in.
Python gives you two distinct modes for this — and the difference between them matters.
write() — cr…
The idea
A CSV file is a text file where each line is a row and each value is separated by a comma.
That's it. No special format, no proprietary software. Just commas and newlin…
What you're building
A daily notes logger. The user writes a note. It gets saved — with a timestamp — to a text file. Every note appends to the same file. Nothing is …