diff --git a/code/get-utxo.py b/code/get-utxo.py index 285aba4c..ebce0083 100644 --- a/code/get-utxo.py +++ b/code/get-utxo.py @@ -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))