add python3 version of lifetime.py