I'm so lost in this small program I want to build... I have a scoreboard dictionary where I want to add scores from another dictionary. My code is looking something like this:
Edit: I have to add scores, not replace.
def addScore(scorebord, scores):
# add values for common keys between scorebord and scores dictionaries
# include any keys / values which are not common to both dictionaries
def main():
scorebord = {}
score = {'a':1,
'b':2,
'c':3}
addScore(scorebord, score)
if __name__ == "__main__":
main()
Does anyone know how to write this function?