to score wordwe can do the followingscore sum([points[cfor in word]orif you prefer the long waytotal for in wordtotal +points[cexample dictionary provides nice way to represent deck of cardsdeck ['value ': 'suit ':cfor in 'spades ''clubs ''hearts ''diamonds 'for in range( , )the deck is actually list of dictionaries the shuffle method can be used to shuffle the deckshuffle(deckthe first card in the deck is deck[ to get the value and the suit of the cardwe would use the followingdeck[ ]'value 'deck[ ]'suit ' working with dictionaries copying dictionaries just like for listsmaking copies of dictionaries is little tricky for reasons we will cover later to copy dictionaryuse its copy method here is an exampled copy(in the in operator is used to tell if something is key in the dictionary for instancesay we have the following dictionaryd ' ': ' ': referring to key that is not in the dictionary will produce an error for instanceprint( [' ']will fail to prevent this errorwe can use the in operator to check first if key is in the dictionary before trying to use the key here is an exampleletter input'enter letter'if letter in dprint'the value is ' [letter]elseprint'not in dictionary 'you can also use not in to see if key is not in the dictionary