Jun-13-2020, 05:43 AM
Still not sure I get it right, but I would get the brokerID list first and then, assign that to each cluster name (as key)
I would do this in list/dict comprehension
I would do this in list/dict comprehension
brokers = [broker['BrokerNodeInfo']['BrokerId'] for broker in kfk_broker['NodeInfoList']] clusters = {cl['ClusterName']:brokers[::] for cl in cluster['ClusterInfoList']}
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs