标签:add baidu color member bin red sadd redis bing
存值
r1 = conn.sadd(‘urls‘, ‘www.bing.com‘) r2 = conn.sadd(‘urls‘, ‘www.baidu.com‘)
若要存入集合的值已存在(redis),则返回值r1或r2是 0
print(conn.smembers(‘urls‘)) # 获取urls对应的集合
标签:add baidu color member bin red sadd redis bing
原文地址:https://www.cnblogs.com/wt7018/p/11756330.html