Menu

How I Built a Todo App with Python - My First Project
πŸ“°

How I Built a Todo App with Python - My First Project

DEV Community: pythonΒ·Wisdom AkpanΒ·1 day ago
#5eyXPbNA
#devtopython#devto#dev#tasks#task
Reading 0:00
15s threshold
Cover image for How I Built a Todo App with Python - My First Project

Wisdom Akpan

I built a Todo App with Python! πŸŽ‰

As a developer from Akwa Ibom learning in Lagos, I wanted to build something real.

πŸ› οΈ Tech Stack

  • Python
  • CLI (Command Line Interface)
  • File handling for saving tasks

✨ Features

  • βž• Add tasks
  • βœ… Mark as done
  • πŸ—‘οΈ Delete tasks
  • πŸ“‹ View all tasks

πŸ’» Code Snippet


python
tasks = []

def add_task(task):
    tasks.append(task)
    print(f"Added: {task}")

def show_tasks():
    for i, task in enumerate(tasks, 1):
        print(f"{i}. {task}")

# My Todo App starts here!
while True:
    print("\n1. Add Task | 2. View | 3. Exit")
    choice = input("Choose: ")

    if choice == "1":
        t = input("Enter task: ")
        add_task(t)
    elif choice == "2":
        show_tasks()
    elif choice == "3":
        break

Enter fullscreen mode Exit fullscreen mode