http://www.yiibai.com/redis/redis_sorted_sets.html mport redis r_server = redis.Redis('localhost') #this line creates a new Redis object and #connects to our redis server r_server.set('test_key', 'test_value') #with the created redis object we can #s…