os.getpid()

os.getpid() → pid

Return the current process id