How can I make a python server which does this?

So I want to somehow make a server either using my own pc/raspberry pi as host server where I can send it requests through an android app and it will reply with stuff. It won't necessarily be a database server, I want to perform a big calculation and I don't want to do it on the phone so the phone will just send the numbers, server does calculation, then return the answer. How can I go about doing this?