Jun-26-2020, 07:14 AM
.join() makes a concatenated string of an iterable, in your case of a dictionary at place [loc] in a list of dictionaries.
The elements are separated by a ','.join , comma in your example.
This is done to present the list of choices in a nicer format.
exits[loc][direction] : says that you need to take the dictionary number [loc] and specifically the value with key [direction]
Paul
The elements are separated by a ','.join , comma in your example.
This is done to present the list of choices in a nicer format.
exits[loc][direction] : says that you need to take the dictionary number [loc] and specifically the value with key [direction]
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.