First time here? Check out the FAQ!

Revision history  [back]

Do you have a file named random.py? I suspect that you're importing that file instead of random from the standard library. You can use print(random) to see the file used. In general, directories that your code is in should be added to the python path.