-
Notifications
You must be signed in to change notification settings - Fork 0
/
ToDo List V1.py
47 lines (43 loc) · 955 Bytes
/
ToDo List V1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import time, os
todoList = []
def printList():
for item in todoList:
print(item)
def pauses():
print("Not in the list")
print(".")
time.sleep(1)
print(".")
time.sleep(1)
print(".")
time.sleep(1)
while True:
os.system("clear")
menu = input("1: Add\n2: Remove\n3: Change\n4: Show\n--> ")
if menu == "1":
item = input("What to add?: ")
todoList.append(item)
time.sleep(1)
elif menu == "2":
printList()
print()
item = input("What to remove?: ")
check = input("Are you sure?: ")
if check[0] == "y":
if item in todoList:
todoList.remove(item)
else:
pauses()
elif menu == "3":
printList()
print()
item = input("What to change?: ")
new = input("What to change it to?: ")
for i in range(0,len(todoList)):
if todoList[i] == item:
todoList[i] == new
elif menu == "4":
print()
print("THE LIST")
printList()
time.sleep(4)