To Do App in Python | GANESH RAWATZ

Published: 05 June 2025
on channel: GANESH RAWAT
64
4

Learn to code a Python to-do list app! This beginner-friendly tutorial shows you how to view, add, and delete tasks with a simple menu. Full code below! 👇 Perfect for organizing your day or learning Python. What’s on your to-do list? Comment below!
#Python #CodingTutorial #ToDoApp #LearnPython #PythonProjects #pythonforbeginners #pythonprojectideas #pythonprojectsforbeginners #pythonprojectswithsourcecode
Subscribe the channel ‪@GaneshRawatz‬ to get more projects!
Code:
def display_menu():
print("\n -- To-Do App --")
print("1. Enter 1 to view tasks")
print("2. Enter 2 to add task")
print("3. Enter 3 to delete task")
print("4. Enter 4 to exit app")
def view_tasks(tasks):
if not tasks:
print("\nYour to-do is empty!")
else:
print("\n Your tasks: ")
for i, task in enumerate(tasks):
print(f"{i}. {task}")
def add_task(tasks):
print("Adding a new tasks\n")
task = input("Enter new task: ")
tasks.append(task)
print("Task added successfully!")
def delete_task(tasks):
view_tasks(tasks)
if tasks:
try:
task_id = int(input("Enter task id to delete: "))
if 1 lt= task_id lt= len(tasks):
removed = tasks.pop(task_id)
print(f"Task {removed} removed successfully!")
else:
print("Invalid task number!")
except ValueError:
print("Enter valid task number!")
def main():
tasks = []
while True:
display_menu()
choice = input("Enter an option (1-4): ")
if choice == '1':
view_tasks(tasks)
elif choice == '2':
add_task(tasks)
elif choice == '3':
delete_task(tasks)
elif choice == '4':
print("Exiting the to-do app! Good bye!")
break
else:
print("Invalid Input!")
if _name_ == "__main__":
main()

Visit: https://www.ganeshrawat.com.np
Thank you!


On this page of the site you can watch the video online To Do App in Python | GANESH RAWATZ with a duration of hours minute second in good quality, which was uploaded by the user GANESH RAWAT 05 June 2025, share the link with friends and acquaintances, this video has already been watched 64 times on youtube and it was liked by 4 viewers. Enjoy your viewing!