'How to add multiple items to a firebase database

I am designing a news application for football news and i have written a program which scrapes titles for articles and links for articles, which i put into 2 seperate lists, article_list and title list. I am then trying to upload these to a realtime firebase database but so far i can only seem to add the first title and article to the database. Here is my code for trying to add the titles and links to the database:

i=0
while i < len(title_list):
    ref.set({
    'News Arcticles':
        {
            'Title' : title_list[i],
            'Link' : article_list[i] 
        }
    })
    i+=1

i have very little experience with firebase so i would appreciate any help on how to do this

thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source