Use:
$ sudo nohup python app1c.py > log.txt 2>&1 &
nohup
allows to run command/process or shell script that can continue running in the background after you log out from a shell.
> log.txt
: it forword the output to this file.
2>&1
: move all the stderr to stdout.
The final &
allows you to run a command/process in background on the current shell.