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!
Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.