I have the first 40 numbers of the sequence. Is there a way to recover the seed or find the next 460 numbers in the sequence?
The first thing to know is that Python's random module uses Mersenne Twister as the PRNG. That is not a cryptographically secure RNG, in fact it is easy to recover the state as long as you have enough samples.
40 numbers of the sizes you use is not sufficient to recover the full MT state and find the next outputs that way.
It is more than enough to recover a time seed as Python uses when OS randomness is not available. You can just run a brute force of time values in the recent past. Latest versions of Python 2/3, however, initialize the full state from urandom or similar where available, and that cannot be inverted with this little output.
(Of course you can still call random.get_state()
but presumably you were not asking that ;)