{"type":"rich","blog_url":"https://okamuuu.hatenablog.com/","author_name":"okamuuu","width":"100%","categories":["Memo","Python"],"title":"redis.py \u3067 Set \u3092 sadd \u3059\u308b","provider_url":"https://hatena.blog","blog_title":"\u3042\u3044\u3064\u306e\u65e5\u8a8c\u03b2","version":"1.0","image_url":null,"height":"190","description":"\u3082\u3046\u4f55\u56de\u304b\u540c\u3058\u4e8b\u3092\u7e70\u308a\u8fd4\u3057\u3066\u3044\u308b\u306e\u3067\u30e1\u30e2 redis.py \u3067 Set \u3092\u8a18\u9332\u3059\u308b\u5834\u5408\u306b\u3053\u3093\u306a\u4e8b\u3092\u3057\u3066\u3057\u307e\u3046 >>> import redis >>> conn = redis.Redis() >>> items = set([1, 2, 3]) >>> conn.sadd('key', items) 1 >>> conn.smembers('key') set(['set([1, 2, 3])']) \u5c55\u958b\u3057\u307e\u3057\u3087\u3046 >>> import redis >>> conn = redis.Redis() >>> conn.sadd('key1', 1, 2, 3) 3 >>> conn.smemb\u2026","author_url":"https://blog.hatena.ne.jp/okamuuu/","provider_name":"Hatena Blog","published":"2015-10-28 12:27:23","url":"https://okamuuu.hatenablog.com/entry/2015/10/28/122723","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fokamuuu.hatenablog.com%2Fentry%2F2015%2F10%2F28%2F122723\" title=\"redis.py \u3067 Set \u3092 sadd \u3059\u308b - \u3042\u3044\u3064\u306e\u65e5\u8a8c\u03b2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}