Invent with Python example