Python - Todoist API - Store data into Dictionary I've this Python code that allows me to collect data from Todoist API. Now I want to store this data into a Dictionary in order to make some data processing and some advanced analytics. Using this code how can I store this values into the structure ?

from pytodoist import todoist
user = todoist.login('####','""""')
projects = user.get_projects()
for project in projects:
    print(project.name)

tasks = user.get_tasks()
for task in tasks:
    print("Project: ", task.project.name, ", Task: ", task.content, ", Date: ", task.date_string, ", Priority: ", task.priority, ", Added in: ", task.date_added)


My key_pais: The strings that I've in For loop "Project", "Task", etc.
Values: the values from taks

Many thanks!
At first remember that a dictionary is just bunches of keys and value pairs...

So, if the key is $a$ and the value is $10$ , you can access the value by doing d[a] (d is the dictionary)

Beaware that there is no order to storing the values, you can use OrderedDict for that..

Also you can have two values for the same key in a simple dictionary.

Here's the complete answer