I am trying to parse blockchain using python using the following code:
from chainscan import iter_blocks
for block in iter_blocks():
if block.height > 10: break
for tx in block.txs:
print('Hello, tx %s in block %s' % (tx, block))
I am getting this following error:
File "<ipython-input-3-06037b89d550>", line 1
for block in iter_blocks():
^
SyntaxError: unexpected EOF while parsing
I have checked the code from my reference and there is no problem in the code but it is still not working. How to solve this?