使用 redis 的 zset
比如我在 key 中操作 3 个学生: student1 和 student2 和 student3
需要对他们先通过性别,在通过出生日期排序
然后设置权重
zadd key student1 score 性别 score 出生日期
zadd key student2 score 性别 score 出生日期
zadd key student3 score 性别 score 出生日期
请问 redis 中的 zset 可以吗?
我在 Python 中设置两个 score 好像是无效的,不知道是不是我的方法不对