You can use fork
to create a child process and then exit the parent.
#!/usr/bin/env python
import os
import sys
import time
_ = raw_input('Enter the the secret code: ')
if os.fork(): # returns 0 in the child, pid of the child in the parent
sys.exit()
time.sleep(2)
print('All good things must come to an end')