If you are on Windows, then you are in the right place ...
Just rename your file: script.py to script.pyw and use it as usual.
Your Script will run in the background.
To close this script:
Go to the Task Manager , click the "Process" tab , pay attention to python , Finish the task .
If you need more information, I am ready to provide you ...
I am not sure about Linux or Ubuntu.
Thanks.
user8167727
source share