Write a python function that takes two parameters, first parameter is a list of dictionary and second is a list of tuples. Append the list of tuples to the list of dictionary


Topic: Write a python function that takes two parameters, first parameter is a list of dictionary and second is a list of tuples. Append the list of tuples to the list of dictionary

Solution

def addentry (listname, addlist):
    for names,ages in addlist:
            listname.append(addlist)
    return listname
    
addentry([{'1':"A"}], [("2", "B")])



List all Python Programs