Suiciding Python script

When a Python script runs for too long, it can commit suicide ⁉ by killing its own PID:

import os
os.kill(os.getpid())

#dev #programming #python