摘要: 1. python 转 json import json data={ "name":"haha", "age" : 1,"list_1":[1,2,3], "tu":(1,2,3), "bo": True, "kong":None } result = json.dumps(data) print 阅读全文
posted @ 2018-11-09 20:48 山…隹 阅读(242) 评论(0) 推荐(0)
摘要: 1. 连接 import redis re = redis.Redis( host = "127.0.0.1", port = 6379 ) 2. 字符串数据: re.set("name",2) #设置name的值为2 data = re.get("name") print(data.decode( 阅读全文
posted @ 2018-11-09 12:18 山…隹 阅读(178) 评论(0) 推荐(0)