mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2024-11-22 08:08:11 +00:00
print() function for Python 3
This commit is contained in:
parent
5f3a3d4469
commit
06ecaf9168
@ -25,4 +25,7 @@ resp = requests.get('https://blockchain.info/unspent?active=%s' % address)
|
|||||||
utxo_set = json.loads(resp.text)["unspent_outputs"]
|
utxo_set = json.loads(resp.text)["unspent_outputs"]
|
||||||
|
|
||||||
for utxo in utxo_set:
|
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))
|
||||||
|
Loading…
Reference in New Issue
Block a user