OMG it is working thanks a lot !!
I am quite new to Python and Programming Bitcoin, any idea where I should start ? which books ?
Thanks !!
If you really insist to use book, people (including me) usually would recommend Mastering Bitcoin 2nd Edition[1]. Although if you prefer something shorter, check learn me a bitcoin website[2] instead. Aside from @PowerGlove said, i find reading documentation and example of certain library/function is helpful to prevent problem like this.
[1]
https://github.com/bitcoinbook/bitcoinbook[2]
https://learnmeabitcoin.com/