I need help editing an outside list inside a function? Python

python

#1
import random

possible_weapons = ["club","axe","spear","bow","gun"]
possible_food = ["bread","steak","trout","salmon",]
possible_actions = ["hunt","fish","farm","build","mine"]
possible_buildings = ["hut","house","farm","armory","mineshaft"]

username = raw_input("What is your name?:")
print """         
                   WELCOME TO!
         
                    |-------|
                    | DAY 1 |
                    |-------| 
                    
                    
                    """
begin = raw_input("Would you like to begin?:") 
 
weapbegin = (random.choice(possible_weapons))
foodbegin = (random.choice(possible_food))

print """ 
          
          This is Day 1 of your epic survival journey.
          
          
          You are located in an unknown area.
          
          
          You must work to survive these unknown elements.
          
          
          You must hunt , fish , sleep , farm , build , and mine.
          
         
          Good Luck %s. 
          -------------------------------------------------------- """ % (username)

inventory = [weapbegin,foodbegin]
userHealth = 100

print """

         Day 1: You have awoken!
         
         All you have is a bag
         
         You have to start surviving
         
         Here is your inventory
         
         %s 
         
         """ % (inventory)
print """ 
        Let's get the hang of things """
print 
print """ To access the action menu press 1 """
print
print """ Your Health is currently max """
print
print """ To show health, type HP 

"""

def hunting():
	user_weapon = raw_input("What weapon would you like to use?:")
	print
	user_kill = raw_input("Which animal are you hunting(Rabbit/Deer/Ram):")
	print
	print "Hunting yields advantages and disadvantages. Be careful!"
	
	if user_weapon and user_kill  == "club" and "Rabbit":
		inventory.append('meat')   #How do i edit the variable?? 
	print "Good Hunt! Your inventory is now %s " % (inventory)

I can't figure out how to .append the list


#2

I am not a thousand percent sure but try inventory.append['meat']


#3

doesn't work look at my if statement
it doesn't add the meat to the inventory


#4

It looks like it should add as long as you are selecting club as the weapon and rabbit is what is being hunted. Anything else and it will not add.


#5

it is now throwing this error

Traceback (most recent call last):
File "python", line 80, in
File "python", line 78, in hunting
TypeError: 'builtin_function_or_method' object has no attribute 'getitem'


#6

#7