A Beginner-Friendly Project for Learning Python
If you're new to programming and want a hands-on project to practice your Python skills, creating a To-Do List App is a great start. It teaches basic concepts such as variables, functions, file handling, conditionals, and loops — all while building something useful and practical.

In this step-by-step guide, you’ll build a simple terminal-based To-Do app using core Python, and by the end, you’ll understand how to expand it further with GUI or web frameworks.
We’ll build a terminal-based to-do list with the following features:
Step 1: Project Setup
You only need:
Create a folder:
bash
CopyEdit
mkdir todo-app
cd todo-app
Inside this folder, create a file:
bash
CopyEdit
touch todo.py
Step 2: Structure the Program
We’ll use a simple dictionary list to manage tasks. Let’s plan:
Step 3: Load and Save Tasks
First, define how tasks will be saved and loaded from a file.
Code:
python
CopyEdit
Copy Code
import os import json FILE_NAME = “tasks.txt” def load_tasks(): if not os.path.exists(FILE_NAME): return [] with open(FILE_NAME, 'r') as file: return json.load(file) def save_tasks(tasks): with open(FILE_NAME, 'w') as file: json.dump(tasks, file, indent=4)
We want to show options to the user every time they open the app.
Code:
python
CopyEdit
Copy Code
def show_menu():
print("\n=== TO-DO LIST MENU ===")
print("1. View Tasks")
print("2. Add Task")
print("3. Mark Task as Completed")
print("4. Delete Task")
print("5. Exit")Display tasks with status.
Code:
python
CopyEdit
Copy Code
def view_tasks(tasks):
if not tasks:
print("No tasks found.")
return
for index, task in enumerate(tasks):
status = "✔" if task['completed'] else "❌"
print(f"{index + 1}. [{status}] {task['task']}")Code:
python
CopyEdit
Copy Code
def add_task(tasks):
task_name = input("Enter the task: ")
tasks.append({'task': task_name, 'completed': False})
save_tasks(tasks)
print("Task added successfully!")Code:
python
CopyEdit
Copy Code
def mark_completed(tasks):
view_tasks(tasks)
try:
choice = int(input("Enter task number to mark as completed: ")) - 1
if 0 <= choice < len(tasks):
tasks[choice]['completed'] = True
save_tasks(tasks)
print("Task marked as completed.")
else:
print("Invalid task number.")
except ValueError:
print("Please enter a valid number.")Code:
python
CopyEdit
Copy Code
def delete_task(tasks):
view_tasks(tasks)
try:
choice = int(input("Enter task number to delete: ")) - 1
if 0 <= choice < len(tasks):
deleted = tasks.pop(choice)
save_tasks(tasks)
print(f"Deleted task: {deleted['task']}")
else:
print("Invalid task number.")
except ValueError:
print("Please enter a valid number.")Now that we have all the building blocks, let’s combine them into a loop.
Code:
python
CopyEdit
Copy Code
def main():
tasks = load_tasks()
while True:
show_menu()
choice = input("Choose an option (1-5): ")
if choice == '1':
view_tasks(tasks)
elif choice == '2':
add_task(tasks)
elif choice == '3':
mark_completed(tasks)
elif choice == '4':
delete_task(tasks)
elif choice == '5':
print("Exiting... Have a productive day!")
break
else:
print("Invalid choice. Try again.")
if __name__ == "__main__":
main()Sample Output:
vbnet
CopyEdit
=== TO-DO LIST MENU ===
1. View Tasks
2. Add Task
3. Mark Task as Completed
4. Delete Task
5. Exit
Choose an option (1-5): 2
Enter the task: Complete Python project
Task added successfully!
=== TO-DO LIST MENU ===
1. View Tasks
…
Once you understand this terminal version, here are upgrade ideas:
1. Add Due Dates
Add a due_date field to tasks:
python
CopyEdit
Copy Code
tasks.append({'task': task_name, 'completed': False, 'due_date': '2026-08-05'})2. Use a GUI Framework
Use Tkinter or PyQt to make a desktop app with buttons and checkboxes.
3. Use a Database
Use SQLite to store tasks instead of a text file.
4. Convert It to a Web App
Use Flask or Django to convert this into a fully working web app.
| Benefit | What You Learn |
| File Handling | Reading and writing with Python |
| JSON | Data serialization and parsing |
| Functions and Loops | Modular thinking and program structure |
| User Input & Validation | Interacting with users safely |
| Project Structure | Working with real-world logic |
Q: Can I make this app in other languages?
Yes, you can build the same app using JavaScript (Node.js), C++, Java, or any language that supports I/O and logic control.
Q: How to run this app repeatedly?
Just run:
bash
CopyEdit
python todo.py
The tasks are saved between sessions using the tasks.txt file.
Q: How to make it available on my phone or online?
You can use Flask to create a web version and host it on platforms like Render, PythonAnywhere, or Heroku.
Building a simple To-Do app in Python is more than just writing code. It’s your gateway into learning how real applications work — from user input to data storage. By following this project, you've already used file I/O, data structures, loops, and conditional logic.
This small but powerful project is the perfect foundation for larger apps in the future.
👉 Learn Python with real hands-on projects at Uncodemy. Their Python Programming Course covers beginner to advanced concepts with live classes, mentorship, and career support.
Take your skills from simple scripts to full applications — start learning today.
TRENDING
BESTSELLER
BESTSELLER
TRENDING
HOT
BESTSELLER
HOT
BESTSELLER
BESTSELLER
HOT
POPULAR