Python Sites Where You Press Keyboard Buttons to Do Stuff?

Can python make a website where you press keyboard buttons to do stuff?
e.g. press arrow keys to roll a ball around the webpage.

What’s the most efficient code language to make a webpage like this?

Thanks.

P.S. if there’s a better site-making site for beginners where I should post this, then feel free to let me know.

You might not nessecerily be able to code a website with just Python, as HTML is more commonly used, however, you can get python to work along side you HTML code. However, there isn’t just a piece of code you can put in there are several other things as well. The easiest option would be to use a templating engine, as it is hard to manually code the input forit to be included on your web page. I would avoid a templating engine that uses python as its main coding form, as python is sensitive to whitespace, so special syntax hacks would have to be added. A few popular choices would be Mako, Jinja and Geshi or you could use Cheetah.

I hope I was able to help

Yours Sincerely

Ben

It gives me an idea of how complex this is and where to start.
Thanks, Ben.