Challenge 2: Set, Check, and Remove a Key — Possible Solution ==================================================================== 127.0.0.1:6379> SET session:42 "active" OK 127.0.0.1:6379> EXISTS session:42 (integer) 1 127.0.0.1:6379> TYPE session:42 string 127.0.0.1:6379> DEL session:42 (integer) 1 WHY THIS WORKS AS AN ANSWER ------------------------------ Each command maps directly to one step in the task, in the same order requested: SET session:42 "active" creates the key with the given value, returning OK to confirm the write succeeded. EXISTS session:42 confirms the key is actually present, returning the integer 1 (Redis's way of representing "true" for a count/existence check) rather than 0. TYPE session:42 reports which data structure the key holds — string, in this case, since it was created with a plain SET. DEL session:42 removes the key, and its return value (1) tells you exactly how many keys were actually deleted — useful confirmation that the deletion targeted a real, existing key rather than silently doing nothing.