You can indeed read (and store) the current state of the RNG, but this changes every time it is used, i.e. you cannot do what you describe after you have run the cell.
Here is an example (since you have tagged the question withkeras
, I assume you are actually interested in the Numpy RNG, which is the one used in Keras):
import numpy as np
current_state = np.random.get_state()
# produce some random numbers:
a = np.random.randn(3)
a
# array([-0.44270351, 1.42933504, 2.11385353])
# Now, restoring the RNG state and producing again 3 random numbers, you get the same result:
np.random.set_state(current_state)
b = np.random.randn(3)
b
# array([-0.44270351, 1.42933504, 2.11385353])
a == b
# array([ True, True, True], dtype=bool)