Code to spawn objects and move them with arrows


I am a complete newbie to Python, other than for the most basic fundamentals, creating lists, adding/subtracting/dividing, variables, reading lists, functions, importing modules, etc.

I am making a zombie survival game, and you are a stationary player in the middle of the game. Zombies spawn from empties off the screen, and you shoot and kill them. Each zombie is 3$, and I made a menu for the things you can buy, most of them are building materials to reinforce your fort and build turrets. I made all of this with logic bricks, but now I’d figure it would be more simple to create a python script to spawn This object at 0,0,0 on the plane “terrain”. I want it when you press number 1, you spawn this material, when you press 2, you spawn a different material.

Once the material spawns, you should be able to move it around with arrows, and I am pretty sure I would be able to figure this out with logic bricks, first check if object is present in scene, then allow the arrows to move it. Then when I hit enter I want to deselect the object.

I am desperate and am watching 2 hours of python tutorials every day, so any help on this matter would be much appreciated!