Skip to content
techsnow
All blogs

Five boring tasks you can automate with 20 lines of Python

“Renaming files, sending reminders, cleaning spreadsheets: small scripts that save you hours every month.”
Attaullah

Instructor, TechSnow

26 Sept 2026 · 1 min read · Python

You do not need to build an app to get value from Python. Some of the most useful scripts are less than a screen long.

Rename a folder of photos

from pathlib import Path

folder = Path("holiday")
for i, photo in enumerate(sorted(folder.glob("*.jpg")), 1):
    photo.rename(folder / f"holiday-{i:03}.jpg")

Other ideas to try

  • Merge every CSV in a folder into one file with pandas
  • Send yourself a reminder email every Monday
  • Download your favourite comic every morning
  • Resize images before uploading them to a website
Start with a task you do at least once a week. The time you save keeps you motivated to write the next script.

Written by

Attaullah

Instructor, TechSnow

Teaches web development, Python and programming fundamentals at TechSnow, with clear lessons in English and Urdu / Hindi and a real project in every course.

3 comments

Be kind. Comments with links are reviewed before they appear.

  • Hamza K. 2 days ago

    Really clear explanation. The example made it click for me.

    • TechSnow teamAuthor2 days ago

      Glad it helped, Hamza! Try changing the example and see what breaks.

  • Mehwish 4 days ago

    Could you write a follow-up with a bigger project?

More blogs