This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
item_numbers = [2, 3, 5] | |
item_definitions = { 1: 'First item', 2: 'Second item', 3: 'Third item', 5: 'Fifth item'} | |
print(80 * '-') | |
print('Plain item names:') | |
items = map(lambda number: item_definitions[number], item_numbers) | |
print(', '.join(items)) | |
print(80 * '-') |