Getting distinct values from nested compound object list

I am getting acquainted with python and would like to know how can I get the distinct senders?

[
Block index: 0
Timestamp: 1635599457.0815217
Transactions:
Previous Block Hash: The Times 03/Jan/2009 Chancellor on brink of second bailout for banks
Metadata: Genesis block using same string as bitcoin!
Hash Target: None
Nonce: 0
Block Hash: be39ccdca122aeeea2cd7c3016ec10c41544f5be488ffe6ce6f4d1368adbb97b
,
Block index: 1
Timestamp: 1635599458.1230247
Transactions: [{‘message’: {‘sender’: ‘alice’, ‘receiver’: ‘bob’, ‘value’: 20, ‘txt_metadata’: ‘’, ‘nonce’: 1}, ‘signature’: ‘jIE3Gdd1cWgqZOsjc866qazsA6snu7WzIViyWjuo6kF7sVNN2/fNjJLbq98JEKWkvCKrO2MtIlEsU+h+uFfB5Irg69VrRV6LJIeyBW4P/iIm2FWcDn8KsifNZonB4o5YUDQWDTDeF0krRJh78EdZsfknGulxg8MBD5pRwvsTN5CsA1f4V5XCb3Vrbx4FZexoifGW37ldlh6nFOnL30EqMG9sAOpA8JjUppfv4oHBB5srU4t3dF85wnH8SRuHK8zLCsM2B2AQ11zVa5IYAT7p8ysTyV5iIOL6K0uUOeXyGB1TyTu/HPQAGNT2Jdakzq2YrS6C/8VdQuvfRosNlWyaew==’}, {‘message’: {‘sender’: ‘alice’, ‘receiver’: ‘carol’, ‘value’: 20, ‘txt_metadata’: ‘’, ‘nonce’: 2}, ‘signature’: ‘EmVr9ArSvpycM8gITH6XeIWf/HfGyXgjY7/XVi3Hw2jkQCStIg/Y5xEdZYksFIGnRjpml22zcPOax4ITBwCn7iSIR9IFvhbE9HK53RyxegJCLxoOIWMSwqjZvxJ25D57FpsQPFkfyB41l4/QG+ruI7WzabXp85N2QpJJd+RhyUz1BIDVH2xyIKxBU9FPab95wlqFkhgHGk7+qDO/DGLMN+3L594qW0I26OmCi3nvAAZ3YCDZ0nvB8XTBfH/wt+D5FVR+MhB2Ai2uxP5I3amO7XbEuN7kHcm/DYSxQyL+aAY0vPL7T27AsHwzuQwGdXL9+zptow00Kc6clmsRMBhnkQ==’}, {‘message’: {‘sender’: ‘bob’, ‘receiver’: ‘carol’, ‘value’: 30, ‘txt_metadata’: ‘’, ‘nonce’: 1}, ‘signature’: ‘BeC49L/xclNVlkgPUoR0KMgVVBqNZS9juVHqpBPKZlbqmOfvwP31fCsQLDWRpCMbmGKcbimc0NlYjHSYhF4tQWQMXmEhoG799bRKvI+u6hmy7Qw2t6Ll7xmV8OqU0vYdFVYDqEGn+5rlY3630o7ubnh6s+NEhw5+5qnRu1qYaAMXr5Icg4E5rpKXaG+7y404oK4v9rtxid21R+/sDsQwprPmsrFfsq+X3pPlc0TQkXXoNKKhEbclZeW4HlnF+6qOqib/IcwBgUVHQEp3B72j9qbNVEA9BLT1eyNhSV11FyKx11UPJOvHVaHspW7LXLgRcRNH3iG2FzLnh9CYP86hOQ==’}, {‘message’: {‘sender’: ‘carol’, ‘receiver’: ‘alice’, ‘value’: 50, ‘txt_metadata’: ‘’, ‘nonce’: 1}, ‘signature’: ‘XNF9ml9AFKJUrREnT4rizXSR7sWFRYo0if3BZwakgFRFo9kzNCqV8MWTUjlC5cU2G4alyMwsxHS6Sg5jXHJHtXkPtN3G2ZgJo/Hie13u8MN9Umnstt3mZ+iFeYeE+KsqE415x4LbTbBs8j1PnLwSW1Gg+ccTsB62qjWEps87SfaJNSeQSw95v7rwo16UHaKcafWWGhNWl3Hp+9c8VzYVpTLMPGISl+Z4mp/2h9IKJGJtu8PyrwpNLKBte4NR2m9bWoFhJRYPD37d5897lZ7OjF7+q2y/tkGvPJvpLieJWAIUrqi4UVx/V5Ebk3KjVGLUpfLTUzRjjcLdc7tOsCjZqQ==’}]
Previous Block Hash: be39ccdca122aeeea2cd7c3016ec10c41544f5be488ffe6ce6f4d1368adbb97b
Metadata:
Hash Target: 000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Nonce: 1415
Block Hash: 000d344a13a0a29f34527bdb7eeaaea612c4106fbbf204e99a8eb18a71896004
,
Block index: 2
Timestamp: 1635599459.209029
Transactions: [{‘message’: {‘sender’: ‘alice’, ‘receiver’: ‘dave’, ‘value’: 20, ‘txt_metadata’: ‘’, ‘nonce’: 3}, ‘signature’: ‘k5sDHTjfwkcjfxuP0aQUmmxfWWXfWj28lqF8CHt6Ie1IzfeW+Ft1HgGvcI6E5BS5UCGPC3FB3r9I/Gf99qv15yz1bqsydnYACm/gFsWdXsTcGPEpjU+lWqOWHsYYOYbAWWFHDhbwUz7QMbrTMnrkLFkoHWBzefjJg7LEasfXxZ9sHlfynR9bVitIkkF+i/yVN/PnD/6dR9VpNCTfh5sOQRy77etEZZIjAHZCp2sK2IkQ/UlzYIAQYYzfea7ftnBy0uFSx6zesSyoaHSVLBPqGQOasYYM+Yobeu4/Msr/wDhm7dkVceBtkStgQ246JIhFVT0s+526iZmfXdeeD93hPw==’}, {‘message’: {‘sender’: ‘dave’, ‘receiver’: ‘carol’, ‘value’: 35, ‘txt_metadata’: ‘’, ‘nonce’: 1}, ‘signature’: ‘U6LqqqtSvT2owYPoZM/qihB8n9VYIv1BhS2LY1tSPs7rHqN9sDdczEX7f4DHhpnaH0I8HkK2xJNLmZZAecDRBUh3MaVYqrWEPR3KYfE4J0/HLuEGBssHTFGML2U3k6uH+54g2z5wEQcNcR7qdpCD/yIEAaPrnz0YuiqthshKgg7Md+N79qYiEcSEIHVUtcpLpp3Ms3ssm2AC+oZkwJnAeLwESoWtmnZEqmqnj/VBDqH32nx5whGTiHrqmn3On23GP+720dfV7wtLWhBqQEDthYz+f8VlinLxt1cqFspuIQwjGdVoct4m+y2/+dxRki8K/9Zisnd8V8ftRq3FArN7gA==’}, {‘message’: {‘sender’: ‘bob’, ‘receiver’: ‘alice’, ‘value’: 100, ‘txt_metadata’: ‘’, ‘nonce’: 2}, ‘signature’: ‘Mq7O2T+j52x+Ftn33XdfDrqZfrWkz69glB7ucrudzUjlGPaoq3cW21yroWOQ1dEnPB+Z6rZd/Xhd96w78PEBQkXsC+BKh+6dc7GiK8BtCiRuMPW3QCDVIpeYYRYwHtWWA7YtamyMeW4KakfypMbySQddxTjV+SxSmC7bSZTVOoggOrLEzN9fj7VUt/YdZLc8DSR69hilWDxZ3jP8bMkQFN4oQxrIPmZbEfhQ4WPORPsA7WY4uwYTkLDCQTwcYndwPu3J/gIDgEfV7DB7fng7nQ1kyd7cXBxrOpO5MB6B9SGzUFK7jKQDrxqYPmqaLn3UhjAxCrTjRqUXhlrFJ6hI0w==’}]
Previous Block Hash: 000d344a13a0a29f34527bdb7eeaaea612c4106fbbf204e99a8eb18a71896004
Metadata:
Hash Target: 000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Nonce: 1401
Block Hash: 0003316ba7459d928ab68ec57d5c949efaaa614163d26b23a52e95a9fe57d4b5
]

Hi Raj,

This is json so: json.loads should help you there.

However, you’ve your quotes wrong: json is " only and you use '. So replace that and go.

N.