python r.hgetall获取所有值

  作者:会飞的

python r.hgetall获取所有值#/usr/bin/env python#-*-coding:UTF-8 -*-import redisall = r.keys('*')for index in range(len(all)): redis_key = all[index].decode('utf-8') k2 = r.hgetall(redis_key) for key,values in k2.items(): pri

python r.hgetall获取所有值



#/usr/bin/env python

#-*-coding:UTF-8 -*-

import redis


all = r.keys('*')

for index in range(len(all)):

    redis_key = all[index].decode('utf-8')

    k2 = r.hgetall(redis_key)

    for key,values in  k2.items():

        print (key,values)


有用  |  无用

猜你喜欢