When a computer is sleeping, programs are not running. In my experience, this has been uniform across all computer OSs.
I have no idea about Windows tablets, but for Android, programs can run while sleeping but I don't know how to achieve it. I never even successfully installed Python on my tablet.
Join the #python-forum IRC channel on irc.freenode.net for off-topic chat!
Please prefer not to PM members. The point of the forum is so that anyone can benefit. We don't want to help you over PMs/emails/Skype chats that others can't benefit from