# Printing an algorand address with Log Opcode

**URL:** <https://forum.algorand.co/t/printing-an-algorand-address-with-log-opcode/4996>\
**Category:** General\
**Tags:** teal, smart-contracts\
**Created:** [November 9, 2021, 2:50pm UTC](https://forum.algorand.co/t/printing-an-algorand-address-with-log-opcode/4996 "2021-11-09T14:50:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![javier0rosas](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.algorand.co/javier0rosas/32/1578_2.png) [@javier0rosas](https://forum.algorand.co/u/javier0rosas)\
**Post date:** [November 9, 2021, 2:50pm UTC](https://forum.algorand.co/t/printing-an-algorand-address-with-log-opcode/4996/1 "2021-11-09T14:50:37Z")

</div>

I want to print Gtxn[1].receiver() using the log opcode. The smart contract is running fine, but when I try to print the results using:

results = base64.b64decode(key)  
results = print("\t{}".format(results))

It prints something like this:

b’}\x89V\xc4\x14w\xaf\<\x07\xbc\xa8\x93\xb6\x1b\xafh\xfbKT@\xd2F \x16\x8c\xc8d\xb5f\x02 b

How do I decode this to show the actual algorand address?

---

<div class="post-metadata">

**Author:** ![Ben](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.algorand.co/ben/32/1979_2.png) [@Ben](https://forum.algorand.co/u/Ben)\
**Post date:** [November 9, 2021, 4:10pm UTC](https://forum.algorand.co/t/printing-an-algorand-address-with-log-opcode/4996/2 "2021-11-09T16:10:24Z")

</div>

Thats the 32 byte public key, you can use algosdk.encoding.encode\_address to turn it into the 58byte version you’re used to seeing

[https://py-algorand-sdk.readthedocs.io/en/latest/algosdk/encoding.html#algosdk.encoding.encode\_address](https://py-algorand-sdk.readthedocs.io/en/latest/algosdk/encoding.html#algosdk.encoding.encode_address)
