test/functional/test_framework/key.py
def generate(self, compressed=True):
        """Generate a random private key (compressed or uncompressed)."""
        self.set(
            random.randrange(
                1,
                SECP256K1_ORDER).to_bytes(
                32,
                'big'),
            compressed)
Generate a random private key (compressed or uncompressed).
Generate a random private key (compressed or uncompressed).
Generate a random private key ( compressed or uncompressed ) .
def generate(self, compressed=True):
        self.set(
            random.randrange(
                1,
                SECP256K1_ORDER).to_bytes(
                32,
                'big'),
            compressed)
def generate ( self , compressed = True ) : self . set ( random . randrange ( 1 , SECP256K1_ORDER ) . to_bytes ( 32 , 'big' ) , compressed )
Generate a random private key (compressed or uncompressed).
Generate a random private key ( compressed or uncompressed ) .
"""Generate a random private key (compressed or uncompressed)."""
self
compressed