diff --git a/README.md b/README.md index 42a4091..3f57482 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,4 @@ # To-do List -These are the files for the To-Do List Python project. - -# All previous versions -If you want to dig into the full history of the development of this project, have a look at this Google Drive link: https://drive.google.com/drive/folders/12MN-6MU4N4PL1VYUSjvtOsdRQPENXD4-?usp=sharing - # Bugs I usually fix bugs on my own but if you find one, post an issue and I will look into it. If you have the time, feel free to fix it as well! @@ -20,4 +15,7 @@ _Example:_ I want to check of my task that is 3rd on my list. When asked for it ## What value to insert when asked to select a subtask If you are asked to provide a subtask to complete an operation, you can select one by inserting the number of the subtask inside a task. -_Example:_ I want to check off my subtask that is 1st inside the task. When asked for it I type '1'. \ No newline at end of file +_Example:_ I want to check off my subtask that is 1st inside the task. When asked for it I type '1'. + +## Due date format +When asked to insert a due date, you can insert it in any format. We can't limit the format, because it would be too restrictive. \ No newline at end of file diff --git a/main.py b/main.py index dd1c6fc..61fa355 100644 --- a/main.py +++ b/main.py @@ -1,309 +1,340 @@ -''' +""" Authors: Odysseus-Abraham Kirikopoulos This script is protected by the GNU Public License 3.0. Refer source as "Odysseus-Abraham Kirikopoulos" when distributing the software. -Version: 1.6.1 Stable -''' +Version: 1.7 +""" -list_1 = {"task1": ["", "", "", ""], "task2": ["", "", "", ""], "task3": ["", "", "", ""], "task4": ["", "", "", ""], "task5": ["", "", "", ""]} #Lists storing the tasks -list_1_name = "Not defined" #The list's name -list_2 = {"task1": ["", "", "", ""], "task2": ["", "", "", ""], "task3": ["", "", "", ""], "task4": ["", "", "", ""], "task5": ["", "", "", ""]} -list_2_name = "Not defined" -list_3 = {"task1": ["", "", "", ""], "task2": ["", "", "", ""], "task3": ["", "", "", ""], "task4": ["", "", "", ""], "task5": ["", "", "", ""]} -list_3_name = "Not defined" -operation_tree = "Not defined" #The selected operation parent from the user (Example: Delete is the parent of delete a task or a list) -operation = "Not defined" #The selected operation from the user -list_chosen = "Not defined" #The selected list to complete an operation -task_chosen = "Not defined" #The selected task to complete an operation -subtask_chosen = 0 #The selected subtask to complete an operation +list_1 = {"task1": ["", "", "", "", "", ""], "task2": ["", "", "", "", "", ""], "task3": ["", "", "", "", "", ""], "task4": ["", "", "", "", "", ""], + "task5": ["", "", "", "", "", ""]} # Lists storing the tasks +list_1_name = None # The list's name +list_2 = {"task1": ["", "", "", "", "", ""], "task2": ["", "", "", "", "", ""], "task3": ["", "", "", "", "", ""], "task4": ["", "", "", "", "", ""], + "task5": ["", "", "", "", "", ""]} +list_2_name = None +list_3 = {"task1": ["", "", "", "", "", ""], "task2": ["", "", "", "", "", ""], "task3": ["", "", "", "", "", ""], "task4": ["", "", "", "", "", ""], + "task5": ["", "", "", "", "", ""]} +list_3_name = None +operation_tree = None # The selected operation parent from the user (Example: Delete is the parent of delete a task or a list) +operation = None # The selected operation from the user +list_chosen = None # The selected list to complete an operation +task_chosen = None # The selected task to complete an operation +subtask_chosen = 0 # The selected subtask to complete an operation -def refresh_pr_list(): #Refreshes the list of tasks - global print_task_l1 - global print_task_l2 - global print_task_l3 +def refresh_pr_list(): # Refreshes the list of tasks - print_task_l1 = f"\nTask 1: {list_1['task1'][0]}\n -> {list_1['task1'][1]}\n -> {list_1['task1'][2]}\n -> {list_1['task1'][3]}\nTask 2: {list_1['task2'][0]}\n -> {list_1['task2'][1]}\n -> {list_1['task2'][2]}\n -> {list_1['task2'][3]}\nTask 3: {list_1['task3'][0]}\n -> {list_1['task3'][1]}\n -> {list_1['task3'][2]}\n -> {list_1['task3'][3]}\nTask 4: {list_1['task4'][0]}\n -> {list_1['task4'][1]}\n -> {list_1['task4'][2]}\n -> {list_1['task4'][3]}\nTask 5: {list_1['task5'][0]}\n -> {list_1['task5'][1]}\n -> {list_1['task5'][2]}\n -> {list_1['task5'][3]}\n" - print_task_l2 = f"\nTask 1: {list_2['task1'][0]}\n -> {list_2['task1'][1]}\n -> {list_2['task1'][2]}\n -> {list_2['task1'][3]}\nTask 2: {list_2['task2'][0]}\n -> {list_2['task2'][1]}\n -> {list_2['task2'][2]}\n -> {list_2['task2'][3]}\nTask 3: {list_2['task3'][0]}\n -> {list_2['task3'][1]}\n -> {list_2['task3'][2]}\n -> {list_2['task3'][3]}\nTask 4: {list_2['task4'][0]}\n -> {list_2['task4'][1]}\n -> {list_2['task4'][2]}\n -> {list_2['task4'][3]}\nTask 5: {list_2['task5'][0]}\n -> {list_2['task5'][1]}\n -> {list_2['task5'][2]}\n -> {list_2['task5'][3]}\n" - print_task_l3 = f"\nTask 1: {list_3['task1'][0]}\n -> {list_3['task1'][1]}\n -> {list_3['task1'][2]}\n -> {list_3['task1'][3]}\nTask 2: {list_3['task2'][0]}\n -> {list_3['task2'][1]}\n -> {list_3['task2'][2]}\n -> {list_3['task2'][3]}\nTask 3: {list_3['task3'][0]}\n -> {list_3['task3'][1]}\n -> {list_3['task3'][2]}\n -> {list_3['task3'][3]}\nTask 4: {list_3['task4'][0]}\n -> {list_3['task4'][1]}\n -> {list_3['task4'][2]}\n -> {list_3['task4'][3]}\nTask 5: {list_3['task5'][0]}\n -> {list_3['task5'][1]}\n -> {list_3['task5'][2]}\n -> {list_3['task5'][3]}\n" + global print_task_l1 + global print_task_l2 + global print_task_l3 + print_task_l1 = f"\nTask 1: {list_1['task1'][0]} | Priority: {list_1['task1'][4]} | Due date: {list_1['task1'][5]}\n -> {list_1['task1'][1]}\n -> {list_1['task1'][2]}\n -> {list_1['task1'][3]}\nTask 2: {list_1['task2'][0]} | Priority: {list_1['task2'][4]} | Due date: {list_1['task2'][5]}\n -> {list_1['task2'][1]}\n -> {list_1['task2'][2]}\n -> {list_1['task2'][3]}\nTask 3: {list_1['task3'][0]} | Priority: {list_1['task3'][4]} | Due date: {list_1['task3'][5]}\n -> {list_1['task3'][1]}\n -> {list_1['task3'][2]}\n -> {list_1['task3'][3]}\nTask 4: {list_1['task4'][0]} | Priority: {list_1['task4'][4]} | Due date: {list_1['task4'][5]}\n -> {list_1['task4'][1]}\n -> {list_1['task4'][2]}\n -> {list_1['task4'][3]}\nTask 5: {list_1['task5'][0]} | Priority: {list_1['task5'][4]} | Due date: {list_1['task5'][5]}\n -> {list_1['task5'][1]}\n -> {list_1['task5'][2]}\n -> {list_1['task5'][3]}\n" + print_task_l2 = f"\nTask 1: {list_2['task1'][0]} | Priority: {list_2['task1'][4]} | Due date: {list_2['task1'][5]}\n -> {list_2['task1'][1]}\n -> {list_2['task1'][2]}\n -> {list_2['task1'][3]}\nTask 2: {list_2['task2'][0]} | Priority: {list_2['task2'][4]} | Due date: {list_2['task2'][5]}\n -> {list_2['task2'][1]}\n -> {list_2['task2'][2]}\n -> {list_2['task2'][3]}\nTask 3: {list_2['task3'][0]} | Priority: {list_2['task3'][4]} | Due date: {list_2['task3'][5]}\n -> {list_2['task3'][1]}\n -> {list_2['task3'][2]}\n -> {list_2['task3'][3]}\nTask 4: {list_2['task4'][0]} | Priority: {list_2['task4'][4]} | Due date: {list_2['task4'][5]}\n -> {list_2['task4'][1]}\n -> {list_2['task4'][2]}\n -> {list_2['task4'][3]}\nTask 5: {list_2['task5'][0]} | Priority: {list_2['task5'][4]} | Due date: {list_2['task5'][5]}\n -> {list_2['task5'][1]}\n -> {list_2['task5'][2]}\n -> {list_2['task5'][3]}\n" + print_task_l3 = f"\nTask 1: {list_3['task1'][0]} | Priority: {list_3['task1'][4]} | Due date: {list_3['task1'][5]}\n -> {list_3['task1'][1]}\n -> {list_3['task1'][2]}\n -> {list_3['task1'][3]}\nTask 2: {list_3['task2'][0]} | Priority: {list_3['task2'][4]} | Due date: {list_3['task2'][5]}\n -> {list_3['task2'][1]}\n -> {list_3['task2'][2]}\n -> {list_3['task2'][3]}\nTask 3: {list_3['task3'][0]} | Priority: {list_3['task3'][4]} | Due date: {list_3['task3'][5]}\n -> {list_3['task3'][1]}\n -> {list_3['task3'][2]}\n -> {list_3['task3'][3]}\nTask 4: {list_3['task4'][0]} | Priority: {list_3['task4'][4]} | Due date: {list_3['task4'][5]}\n -> {list_3['task4'][1]}\n -> {list_3['task4'][2]}\n -> {list_3['task4'][3]}\nTask 5: {list_3['task5'][0]} | Priority: {list_3['task5'][4]} | Due date: {list_3['task5'][5]}\n -> {list_3['task5'][1]}\n -> {list_3['task5'][2]}\n -> {list_3['task5'][3]}\n" -def list_select(): #Allows the user to select a list - global list_chosen +def list_select(): # Allows the user to select a list - list_chosen = str(input(f"\nSelect a list\n[{list_1_name}]\n[{list_2_name}]\n[{list_3_name}]\n")) + global list_chosen - if list_chosen == list_1_name: - list_chosen = list_1 - - elif list_chosen == list_2_name: - list_chosen = list_2 + list_chosen = str(input(f"\nSelect a list\n[{list_1_name}]\n[{list_2_name}]\n[{list_3_name}]\n")) - elif list_chosen == list_3_name: - list_chosen = list_3 + if list_chosen == list_1_name: + list_chosen = list_1 - else: - print("Err:ListNotFound") + elif list_chosen == list_2_name: + list_chosen = list_2 -def task_select(): #Allows the user to select a task + elif list_chosen == list_3_name: + list_chosen = list_3 - global task_chosen + else: + print("Err:ListNotFound") - list_select() - - if list_chosen == list_1: - task_chosen = input(f"\nSelect a task: {print_task_l1}\n") - - elif list_chosen == list_2: +def task_select(): # Allows the user to select a task - task_chosen = input(f"\nSelect a task: {print_task_l2}\n") + global task_chosen - elif list_chosen == list_3: + list_select() - task_chosen = input(f"\nSelect a task: {print_task_l3}\n") + if list_chosen == list_1: - else: - print("Err:ListNotFound") + task_chosen = input(f"\nSelect a task: {print_task_l1}\n") -def subtask_select(): + elif list_chosen == list_2: - global subtask_chosen + task_chosen = input(f"\nSelect a task: {print_task_l2}\n") - task_select() + elif list_chosen == list_3: - subtask_chosen = input(f"\nSelect a subtask:\n") + task_chosen = input(f"\nSelect a task: {print_task_l3}\n") - subtask_chosen = int(subtask_chosen) + else: + print("Err:ListNotFound") -#Startup -print("To-Do List Copyright (C) 2022 Odysseus-Abraham Kirikopoulos\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions.") #Prints the GNU Public License 3.0 -print("Build Version: 1.6.1 Stable\n\n") #Prints the build version -#Greet +def subtask_select(): # Allows the user to select a subtask + + global subtask_chosen + + task_select() + + subtask_chosen = input(f"\nSelect a subtask:\n") + + subtask_chosen = int(subtask_chosen) + + +# Startup +print("To-Do List GNU General Public License 3.0 2022 Odysseus-Abraham Kirikopoulos\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions.") # Prints the GNU Public License 3.0 +print("Build Version: 1.7\n\n") # Prints the build version + +# Greet print("~~~ MY TO-DO LIST ~~~") -#Operations -while True: #Infinete loop - - operation_tree = input("\nSelect the type of operation:\n(1) Create\n(2) Delete/Check off\n(3) Rename\n(4) View\nTo exit press 0\n\n") #Asks the user to select an operation +# Operations +while True: # Infinite loop + + operation_tree = input("\nSelect the type of operation:\n(1) Create\n(2) Delete/Check off\n(3) Edit\n(4) View\nTo exit press 0\n\n") # Asks the user to select an operation + + if operation_tree == "0": # User exiting + break + + elif operation_tree == "1": # User creating a list or a (sub)task + operation = input("\n -> (1) Create a list\n -> (2) Create a task\n -> (3) Create a subtask\n\n") + + # Create a new list + if operation == "1": + + if list_1_name == None: # Checking which list is not occupied in order to create a list + + list_1_name = input("\nName your new list: ") + print(f"{list_1_name} created") + + elif list_2_name == None: + + list_2_name = input("\nName your new list: ") + print(f"{list_2_name} created") + + elif list_3_name == None: + + list_3_name = input("\nName your new list: ") + print(f"{list_3_name} created") + + elif (list_1_name and list_2_name and list_3_name != None): # In case there are 3 lists, no more can be created + + print("Err:MaxListsReached") + + refresh_pr_list() + + # Create a new task + elif operation == "2": - if operation_tree == "0": #User exiting - break + list_select() - elif operation_tree == "1": #User creating a list or a (sub)task - operation = input("\n -> (1) Create a list\n -> (2) Create a task\n(3) -> Create a subtask\n\n") + if list_chosen["task1"][0] == "": # Checking a non-occupied task to create the new one - #Create a new list - if operation == "1": + list_chosen["task1"][0] = input("\nEnter your task: ") + print("\nTask created successfully!\n") - if(list_1_name == "Not defined"): #Checking which list is not occupied in order to create a list + list_chosen["task1"][4] = input("Enter the priority of the task (1-3): ") + list_chosen["task1"][5] = input("Enter the due date for the task (DD/MM/YYYY): ") - list_1_name = input("\nName your new list: ") - print(f"{list_1_name} created") + elif list_chosen["task2"][0] == "": - elif(list_2_name == "Not defined"): + list_chosen["task2"][0] = input("\nEnter your task: ") + print("\nTask created successfully!\n") - list_2_name = input("\nName your new list: ") - print(f"{list_2_name} created") + list_chosen["task2"][4] = input("Enter the priority of the task (1-3): ") + list_chosen["task2"][5] = input("Enter the due date for the task (DD/MM/YYYY): ") - elif(list_3_name == "Not defined"): + elif list_chosen["task3"][0] == "": - list_3_name = input("\nName your new list: ") - print(f"{list_3_name} created") + list_chosen["task3"][0] = input("\nEnter your task: ") + print("\nTask created successfully!\n") - elif(list_1_name and list_2_name and list_3_name != "Not defined"): #In case there are 3 lists, no more can be created + list_chosen["task3"][4] = input("Enter the priority of the task (1-3): ") + list_chosen["task3"][5] = input("Enter the due date for the task (DD/MM/YYYY): ") - print("Err:MaxListsReached") + elif list_chosen["task4"][0] == "": - refresh_pr_list() + list_chosen["task4"][0] = input("\nEnter your task: ") + print("\nTask created successfully!\n") - #Create a new task - elif operation == "2": + list_chosen["task4"][4] = input("Enter the priority of the task (1-3): ") + list_chosen["task4"][5] = input("Enter the due date for the task (DD/MM/YYYY): ") - list_select() + elif list_chosen["task5"][0] == "": - if list_chosen["task1"][0] == "": #Checking an non-occupied task to create the new one + list_chosen["task5"][0] = input("\nEnter your task: ") + print("\nTask created successfully!\n") - list_chosen["task1"][0] = input("\nEnter your task: ") - print("\nTask created successfully!") + list_chosen["task5"][4] = input("Enter the priority of the task (1-3): ") + list_chosen["task5"][5] = input("Enter the due date for the task (DD/MM/YYYY): ") - elif list_chosen["task2"][0] == "": + else: - list_chosen["task2"][0] = input("\nEnter your task: ") - print("\nTask created successfully!") + print("\nErr:MaxTasksReached") # In case there are 5 tasks, no more can be created - elif list_chosen["task3"][0] == "": + refresh_pr_list() - list_chosen["task3"][0] = input("\nEnter your task: ") - print("\nTask created successfully!") + # Create a subtask + elif operation == "3": - elif list_chosen["task4"][0] == "": + task_select() - list_chosen["task4"][0] = input("\nEnter your task: ") - print("\nTask created successfully!") + if list_chosen[task_chosen][1] == "": # Checking non-occupied subtask to create the new one - elif list_chosen["task5"][0] == "": + list_chosen[task_chosen][1] = input("\nEnter your task: ") + print("\nSubtask created successfully!") - list_chosen["task5"][0] = input("\nEnter your task: ") - print("\nTask created successfully!") + elif list_chosen[task_chosen][2] == "": - else: + list_chosen[task_chosen][2] = input("\nEnter your task: ") + print("\nSubtask created successfully!") - print("\nErr:MaxTasksReached") #In case there are 5 tasks, no more can be created + elif list_chosen[task_chosen][3] == "": - refresh_pr_list() + list_chosen[task_chosen][3] = input("\nEnter your task: ") + print("\nSubtask created successfully!") - #Create a subtask - elif operation == "3": + else: # In case there are 3 subtasks, no more can be created - task_select() + print("\nErr:MaxSubtasksReached") - if list_chosen[task_chosen][1] == "": #Checking an non-occupied subtask to create the new one + refresh_pr_list() - list_chosen[task_chosen][1] = input("\nEnter your task: ") - print("\nSubtask created successfully!") + if operation_tree == "2": # User deleting/checking off a list or a (sub)task - elif list_chosen[task_chosen][2] == "": + operation = input("\n -> (1) Check off a task\n -> (2) Check off a subtask\n -> (3) Delete a list\n -> (4) Delete a task\n\n") - list_chosen[task_chosen][2] = input("\nEnter your task: ") - print("\nSubtask created successfully!") + # Check off a task + if operation == "1": + task_select() - elif list_chosen[task_chosen][3] == "": + list_chosen[task_chosen][0] += " [Done]" # Adding "[Done]" to the end of the selected task + print("Task checked off successfully!") - list_chosen[task_chosen][3] = input("\nEnter your task: ") - print("\nSubtask created successfully!") + refresh_pr_list() - else: #In case there are 3 subtasks, no more can be created + # Check off a subtask + if operation == "2": + subtask_select() - print("\nErr:MaxSubtasksReached") + list_chosen[task_chosen][subtask_chosen] += " [Done]" # Adding "[Done]" to the end of the selected subtask + print("Subtask checked off successfully!") - refresh_pr_list() + refresh_pr_list() - if operation_tree == "2": #User deleting/checking off a list or a (sub)task + # Delete a list + if operation == "3": - operation = input("\n -> (1) Check off a task\n -> (2) Check off a subtask\n -> (3) Delete a list\n -> (4) Delete a task\n\n") + list_select() - #Chech off a task - if operation == "1": + if list_chosen == list_1: - task_select() + list_1_name = list_2_name # Moving the name of the second list to the first one + list_2_name = list_3_name # Moving the name of the third list to the second one + list_3_name = None # Setting the name of the third list to None + list_1 = list_2 # Moving the second list to the first one + list_2 = list_3 # Moving the third list to the second one + list_3 = {"task1": ["", "", "", "", "", ""], "task2": ["", "", "", "", "", ""], "task3": ["", "", "", "", "", ""], "task4": ["", "", "", "", "", ""], + "task5": ["", "", "", "", "", ""]} + print("List deleted successfully!") - list_chosen[task_chosen][0] += " [Done]" #Adding "[Done]" to the end of the selected task - print("Task checked off successfully!") + elif list_chosen == list_2: - refresh_pr_list() + list_2_name = list_3_name + list_3_name = None + list_2 = list_3 + list_3 = {"task1": ["", "", "", "", "", ""], "task2": ["", "", "", "", "", ""], "task3": ["", "", "", "", "", ""], "task4": ["", "", "", "", "", ""], + "task5": ["", "", "", "", "", ""]} + print("List deleted successfully!") - #Check off a subtask - if operation == "2": + elif list_chosen == list_3: - subtask_select() + list_3_name = None + list_3 = {"task1": ["", "", "", "", "", ""], "task2": ["", "", "", "", "", ""], "task3": ["", "", "", "", "", ""], "task4": ["", "", "", "", "", ""], + "task5": ["", "", "", "", "", ""]} + print("List deleted successfully!") - list_chosen[task_chosen][subtask_chosen] += " [Done]" #Adding "[Done]" to the end of the selected subtask - print("Subtask checked off successfully!") + else: - refresh_pr_list() + print("Err:ListNotFound") - #Delete a list - if operation == "3": + refresh_pr_list() - list_select() + # Delete a task + if operation == "4": + task_select() - if list_chosen == list_1: + list_chosen[task_chosen][0] = "" # Setting a task blank + list_chosen[task_chosen][1] = "" + list_chosen[task_chosen][2] = "" + list_chosen[task_chosen][3] = "" - list_1_name = list_2_name #Moving the name of the second list to the first one - list_2_name = list_3_name #Moving the name of the third list to the second one - list_3_name = "Not defined" #Setting the name of the third list to "Not defined" - list_1 = list_2 #Moving the second list to the first one - list_2 = list_3 #Moving the third list to the second one - list_3 = {"task1":["","","",""],"task2":["","","",""],"task3":["","","",""],"task4":["","","",""],"task5":["","","",""]} #Setting the third list to a default one - print("List deleted successfully!") + refresh_pr_list() - elif list_chosen == list_2: + if operation_tree == "3": # User editing a list or a task - list_2_name = list_3_name - list_3_name = "Not defined" - list_2 = list_3 - list_3 = {"task1":["","","",""],"task2":["","","",""],"task3":["","","",""],"task4":["","","",""],"task5":["","","",""]} - print("List deleted successfully!") + operation = input("\n -> (1) Rename a list\n -> (2) Rename a task\n -> (3) Edit a task's priority\n\n") - elif list_chosen == list_3: + # Rename a list + if operation == "1": - list_3_name = "Not defined" - list_3 = {"task1": ["", "", "", ""], "task2": ["", "", "", ""], "task3": ["", "", "", ""], "task4": ["", "", "", ""], "task5": ["", "", "", ""]} - print("List deleted successfully!") + list_select() - else: + if list_chosen == list_1: # Renaming the list + list_1_name = input(f"\nRename the list (previous name: {list_1_name}):\n") + print("Renamed the list successfully!") - print("Err:ListNotFound") + elif list_chosen == list_2: + list_2_name = input(f"\nRename the list (previous name: {list_2_name}):\n") + print("Renamed the list successfully!") - refresh_pr_list() + elif list_chosen == list_3: + list_3_name = input(f"\nRename the list (previous name: {list_3_name}):\n") + print("Renamed the list successfully!") - #Delete a task - if operation == "4" : - - task_select() + else: + print("\nErr:ListNotFound") - list_chosen[task_chosen][0] = "" #Setting a task blank - list_chosen[task_chosen][1] = "" - list_chosen[task_chosen][2] = "" - list_chosen[task_chosen][3] = "" + refresh_pr_list() - refresh_pr_list() + # Rename a task + if operation == "2": + task_select() - if operation_tree == "3": #User editing a list or a task + list_chosen[task_chosen][0] = input(f"Rename the task: ") # Renaming the task + print("Renamed the task successfully!") - operation = input("\n -> (1) Rename a list\n -> (2) Rename a task\n\n") - - #Rename a list - if operation == "1": + refresh_pr_list() - list_select() + # Add priority to a task + if operation == "3": - if list_chosen == list_1: #Renaming the list - list_1_name = input(f"\nRename the list (previous name: {list_1_name}):\n") - print("Renamed the list successfuly!") + task_select() - elif list_chosen == list_2: - list_2_name = input(f"\nRename the list (previous name: {list_2_name}):\n") - print("Renamed the list successfuly!") - - elif list_chosen == list_3: - list_3_name = input(f"\nRename the list (previous name: {list_3_name}):\n") - print("Renamed the list successfuly!") + list_chosen[task_chosen][4] = input("Edit the priority of the task (1-3): ") # Adding priority to the task - else: - print("\nErr:ListNotFound") + refresh_pr_list() - refresh_pr_list() - - #Rename a task - if operation == "2": - - task_select() + print("\nEdited priority to the task successfully!") - list_chosen[task_chosen][0] = input(f"Rename the task: ") #Renaming the task - print("Renamed the task successfuly!") + if operation_tree == "4": # User viewing a list - refresh_pr_list() + list_select() - if operation_tree == "4": #User viewing a list - - list_select() + if list_chosen == list_1: # Printing the list selected + print(print_task_l1) - if list_chosen == list_1: #Printing the list selected - print(print_task_l1) - - elif list_chosen == list_2: - print(print_task_l2) + elif list_chosen == list_2: + print(print_task_l2) - elif list_chosen == list_3: - print(print_task_l3) + elif list_chosen == list_3: + print(print_task_l3) - else: - print("Err:ListNotFound") - -exit_key = input() #Exiting the program + else: + print("Err:ListNotFound") +exit_key = input() # Exiting the program -#This program is protected by the GNU General Public License v3.0 | ODYSSEUS-ABRAHAM KIRIKOPOULOS | 2022 | SOME RIGHTS RESERVED \ No newline at end of file +# This program is protected by the GNU General Public License v3.0 | ODYSSEUS-ABRAHAM KIRIKOPOULOS | SOME RIGHTS RESERVED