New to python and trying to do a random number generator. However, I am having trouble importing the random module. I get a AttributeError when I try to use anything from the random module. Thanks for your help.
x = random.randint(1,1000)
if __name__ == '__main__':
You probably have a file named random.py (or pyc) in your current directory. You can find out where the random module you're using comes from by doing this:
import random print(random.__file__)