Concatinate two lists
inventory = ["sword", "armor", "shield", "healing potion"] chest = ["gold", "gems"] print "You find a chest which contains:" print chest print "You add the contents of the chest to your inventory." inventory += chest print "Your inventory is now:" print inventory
1. | List concatenation: speed | ||
2. | Using List Operators | ||
3. | Concatenation ( + ) | ||
4. | List concatenation Demo |