1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-11-21 23:58:09 +00:00

print() function for Python 3

This commit is contained in:
cclauss 2017-08-24 18:20:22 +02:00 committed by GitHub
parent 5f3a3d4469
commit 06ecaf9168

View File

@ -25,4 +25,7 @@ resp = requests.get('https://blockchain.info/unspent?active=%s' % address)
utxo_set = json.loads(resp.text)["unspent_outputs"]
for utxo in utxo_set:
print "%s:%d - %ld Satoshis" % (utxo['tx_hash'], utxo['tx_output_n'], utxo['value'])
print("%s:%d - %ld Satoshis" % (utxo['tx_hash'], utxo['tx_output_n'],
utxo['value']))
# Or try...
# print("{tx_hash}:{tx_output_n} - {value} Satoshis".format(**utxo))