5 Python Scripts That Saved Me Hours as a Student Developer

Introduction
As a student developer juggling college, internships, and projects, I've often found myself stuck doing the same repetitive tasks — renaming files, cleaning CSVs, or merging PDFs. That's when I leaned into Python's power to automate the boring stuff. Here's a collection of 5 Python scripts that genuinely saved me hours, and I still use them regularly.
1. Bulk File Renamer
Use case: I had 100+ screenshots named like Screenshot(1).png
from lectures, and I wanted to rename them neatly.
import os
def rename_files(directory, prefix):
for count, filename in enumerate(os.listdir(directory)):
ext = os.path.splitext(filename)[1]
src = os.path.join(directory, filename)
dst = os.path.join(directory, f"{prefix}_{count}{ext}")
os.rename(src, dst)
rename_files("C:/Users/Me/Downloads/screenshots", "screenshot")
---
2. CSV Cleaner
Use case: Many public datasets I use for college projects are messy. This script cleans them.
import pandas as pd
def clean_csv(input_file, output_file):
df = pd.read_csv(input_file)
df.dropna(how='all', inplace=True)
df.columns = df.columns.str.strip()
df.to_csv(output_file, index=False)
clean_csv("raw_data.csv", "cleaned_data.csv")
---
3. Email Reminder Bot
Use case: I once missed a submission deadline. Now I set reminders via email using Python.
import smtplib
from email.message import EmailMessage
def send_reminder(subject, body, to_email):
msg = EmailMessage()
msg.set_content(body)
msg['Subject'] = subject
msg['From'] = 'your_email@example.com'
msg['To'] = to_email
with smtplib.SMTP_SSL('smtp.gmail.com', 465) as smtp:
smtp.login('your_email@example.com', 'your_app_password')
smtp.send_message(msg)
send_reminder("Submit Assignment", "Don't forget the 11:59 PM deadline!", "friend@example.com")
---
4. Quick PDF Merger
Use case: For every lab report, I needed to combine multiple PDFs into one.
from PyPDF2 import PdfMerger
def merge_pdfs(files, output):
merger = PdfMerger()
for pdf in files:
merger.append(pdf)
merger.write(output)
merger.close()
merge_pdfs(["1.pdf", "2.pdf", "3.pdf"], "merged.pdf")
---
5. Markdown to HTML Converter
Use case: I write project notes in Markdown and wanted to turn them into clean HTML pages.
import markdown
def md_to_html(md_file, html_file):
with open(md_file, 'r') as f:
text = f.read()
html = markdown.markdown(text)
with open(html_file, 'w') as f:
f.write(html)
md_to_html("notes.md", "notes.html")
---
Final Thoughts
These scripts may be small, but the time they've saved is massive. If you're just getting into Python, build scripts that solve your own problems — that’s where the real learning happens. Automation isn't just about productivity; it’s about freeing yourself to focus on what matters most: building, learning, and growing as a developer.
Comments
Post a Comment