Battleship. How to put it on a website?


I've done this whole course and I would like to put this knowledge into practise.

I want to make a simple website with my version of battleships. I can make a website with html and css and put it online.
But how to make the web server interpret this Python code? All I find is about creating the mechanics of games with the code and pygame library.

I'd appreciate your help.