#!/usr/bin/python
#!coding:utf-8

import time
import redis

if __name__ == "__main__":
    try:
        conn=redis.StrictRedis(host='192.168.80.41')
        conn.sadd('s001','001')
        conn.sadd('s001','002')
        conn.sadd('s001','003')
        print(conn.smembers('s001'))#打开 002,001,003
        print(conn.sort('s001'))#打印 001,002,003
        pass
    except Exception as err:
        print(err)

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2021-08-08
  • 2021-06-13
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
  • 2022-03-08
  • 2022-01-08
相关资源
相似解决方案