I want to make a program that runs a code when you just click on a button on a keyboard for example, I press A and some code runs, but I do not have to press enter or input it to run it. Just like in video games, your character moves if you press W. Sorry if it is worded badly, I am pretty confused about this.
Keep in mind please it's Python 2.7