-2

When I print address it gives me this:

print(address)
{'public': {'hex_uncompressed': '049015c99a66c40c11daf9bb690daee5dba6ff45804786f5dba32ab9eaaadc2391e47ff9c08482b69d453e8fbfe2640215a5aa0854e4a9beaa61caf4d94c032564', 'hex': '029015c99a66c40c11daf9bb690daee5dba6ff45804786f5dba32ab9eaaadc2391', 'address': '1BHoHUcQUHcdKeFZ2uGgwmNCKmqrPLyCTz'}, 'private': {'wif': 'KyXxdsxP4DX4Tbe2eEvZVFq8k5VmkQoNNUjfNbY7AV7GJQsHBLKh', 'hex': '4510178e0d496f5eb387145856924669097345073291da84e797e5eb9b3fe2a901', 'hex_uncompressed': '4510178e0d496f5eb387145856924669097345073291da84e797e5eb9b3fe2a9', 'wif_uncompressed': '5JLhhXaPfntDZm6ftV5S2sV8C7ujmGpD6KX4Frxz8b1WkSKQXnk'}}

I want to extract 'address' only how to do that?

I did try searching question but didn't find it

Tim Roberts
  • 48,973
  • 4
  • 21
  • 30

1 Answers1

0

You can call it like you call a part of a list.

test = {'public': {'address': 'something',
    'wifi': 'notsomething'}}
 print(test['public']['address'])

Hope this helps.

Char
  • 1
  • 2