I'm new to Python, and although I've quite some programming experience, I wasn't able to find an answer for this problem:
As a first project, I am trying to create a small text game. All is going well (since it's very basic), except for my inventory system.
At the start of the game/script, I declare a global variable "inventory", and make it a list:
def start(): global inventory inventory = 
Next, I created a function to display the inventory:
def inventory(): global inventory print print "You are carrying:" for item in inventory: print " - "+item print
But, an error occurs: "TypeError: 'list' object is not callable". When I declare the list inside the inventory() function everything works well, so I assume this has something to do with me making the variable not global somehow..?
Any thoughts on this?