title: How to find the seed of the random number generator?
body: <p>I'm using the following lines of code to populate the entries of <code>l_new</code> from <code>l</code>.</p>
  <pre><code>import random
  
  l = [11.1, 22.2, 33.3, 11.1, 33.3, 33.3, 22.2, 55.5]
  
  l_new = random.choices(l, k=30)
  print(l_new)
  </code></pre>
  <p>I could generate a particular <code>l_new</code> always by fixing the seed using</p>
  <pre><code>random.seed(1)
  l_new = random.choices(l, k=30)
  </code></pre>
  <p>Now, I would like to know if it is possible to find the <code>seed</code> for a given <code>l_new</code> when the seed is not fixed prior to the generation of <code>l_new</code>.</p>
  <p>EDIT:</p>
  <p>From what has been suggested below can I do</p>
  <pre><code>import sys
  import random
  l = [11.1, 22.2, 33.3, 11.1, 33.3, 33.3, 22.2, 55.5]
  
  for i in range(10):
      seed = random.randrange(sys.maxsize)
      print(&quot;Seed:&quot;, seed)
      random.seed(seed)
      l_new = random.choices(l, k=30)
      print(l_new)
  
  and save `seed` to retrieve the required `l_new` later on?
  </code></pre>