Table of Contents
To-Do-List program in python
We have created simple user define module to create to-do-list.
Simple To-Do-List program in python
task.py
task = []
completed = []
def add(i):
task.append(i)
#itvoyagers.in
def delete(i):
print("n"+i + " is deleted from the list")
task.remove(i)
#itvoyagers.in
def view():
n = 1
print("nTasks in list")
for t in task:
print(str(n)+" : "+t)
n = n + 1
n = 1
if(completed != []):
print("Tasks Completed")
for t in completed:
print(str(n)+" : "+t)
n = n + 1
else:
print("No task completed yetn")
#itvoyagers.in
def done(i):
print("n"+ i + " is donen")
task.remove(i)
completed.append(i)
to-do-list.py
import task as todolist
todolist.add("Milk")
todolist.add("Egg")
todolist.add("Bread")
todolist.view()
todolist.done("Bread")
todolist.view()
todolist.delete("Egg")
todolist.view()
Output
Tasks in list
1 : Milk
2 : Egg
3 : Bread
No task completed yet
Bread is done
Tasks in list
1 : Milk
2 : Egg
Tasks Completed
1 : Bread
Egg is deleted from the list
Tasks in list
1 : Milk
Tasks Completed
1 : Bread
We are aiming to explain all concepts of python in easiest terms as possible.

ITVoyagers
Author
PRACTICALS/PRACTICE PROGRAM IN PYTHON
CHECKOUT OTHER RELATED TOPICS
CHECKOUT OTHER QUIZZES
Quizzes on File Handling |
Easy quiz on file handling in python part 1 |
Easy quiz on file handling in python part 2 |
Quizzes on Exception Handling |
Easy quiz on Exception Handling in python part 1 |
Easy Quiz on Exception Handling in python part 2 |
Quizzes on Regular Expressions |
Easy Quiz on Regular Expression in python part 1 |
Quizzes on Python concepts coming soon… |
Python basic quiz |
New and easy python quiz basic part 1 |
New and easy python quiz (basic) part 2 |
New and easy python quiz (basic) part 3 |
Python practice quiz set |
Best Practice Quiz Set on Python Programming Part 1 |
Best Practice Quiz Set on Python Programming Part 2 |
Best Practice Quiz Set on Python Programming Part 3 |
Best Practice Quiz Set on Python Programming Part 4 |
Best Practice Quiz Set on Python Programming Part 5 |