TITLE: Does randomness exist in computers and in nature?
QUESTION [10 upvotes]: In the programming language Python, you can import random and then with
random.random()

you can get a random number between $0$ and $1$.
But is it truly random or are there constraints in how computers are built that makes them not truly random number generators?
For instance, could there be a bias around the first value generated or value already in memory?
How would one figure out the difference?

REPLY [7 votes]: Pseudorandom number generators are based on well-defined mathematical sequences and are perfectly deterministic. Given the same seed, they will always generate the same sequence.
This is actually often a desirable property, as it allows you to test at will in the same conditions.
Sources of true randomness are present in a computer due to the many independent (asynchronous) tasks running and events occurring all the time. RAM content at well chosen addresses or clock time are indeed unpredictable and random. You can use this data to seed your generator every now and then.

Pseudorandom generators are designed to simulate a uniform distribution and they are validated by theory and by statistical tests to ensure that.
On the opposite, other sources of randomness may exhibit different kind of bias and non-uniformities. So in a way, they will look less random. There are probably some random sources (like described above) that you might detect by statistical tests or by discovering patterns, but this is probably a difficult exercise.