Thanks for the tips
Honestly, I don't fully trust those software wallets.
I want to know how to use a python script to make a tx with my private key and address.
Oh this is a very bad idea. By typing your seed phrase or private key into a Python script, it could be stolen by an attacker (now or in the future). Your backup software might create a file system backup without you noticing or you might use an HDD from which deleted files can be recovered even a long time in the future, so writing a seed to disk is always highly discouraged (by me).
And your secondary risk will be loss of funds due to an error in your code. The open-source wallets BlackHatCoiner linked for you, have been reviewed, tested and improved over years by hundreds of developers; I don't see why they would be worse than your own custom script.
Especially if you don't write everything by yourself, but
trust one of the libraries linked above, you can just as well use a tried-and-tested open-source wallet (that most probably uses the
exact same library).
For educational purposes, I get it and would recommend the same things that the others recommended above. But since you specifically mentioned you intend to use this with real mainnet funds, I wanted to type out a little disclaimer.