CodeLab Solution 51828

CS101 CodeLab Solutions

CodeLab Solution 51828

Given a variable , province_premier, that is associated with a dictionary that maps the province names to the names of province premiers, associate with premier_province a dictionary that is the inverse of province_premier, i.e. one that maps names of premiers to province names.

[cc lang=”PYTHON”] premier_province = {x: y for y, x in province_premier.items()}

No Comments Yet.

Leave a comment

You must be Logged in to post a comment.