Mega Code Archive

 
Categories / Python / List
 

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