Define Range For Dictionary Python Functions