``` python r=redis.Redis() print r.set("foo", "bar") print r.expire("foo", 1) time.sleep(0.5) print r.ttl("foo") print r.get("foo") ``` prints ``` True True None bar ``` but ttl should return 0 in this case, expire is set