Skip to content

Instantly share code, notes, and snippets.

@yogesh112211
yogesh112211 / python3.py
Created January 17, 2026 04:35
python3 ' Simple To-Do List Manager '
import os
import json
TASKS_FILE = "tasks.json"
def load_tasks():
"""Load tasks from file if it exists"""
if os.path.exists(TASKS_FILE):
try:
with open(TASKS_FILE, 'r') as f:
import os
import json
TASKS_FILE = "tasks.json"
def load_tasks():
"""Load tasks from file if it exists"""
if os.path.exists(TASKS_FILE):
try:
with open(TASKS_FILE, 'r') as f:
return json.load(f)