i am a beginner, i tried to have python generate a random integer from 0 to 10 my code looks like this: import random number = random.randint(0,10) print number i am using python 2.7 it gives AttributeError: 'module' object has no attribute 'randint' please help, thank you very much. Oct 22 '11 # 1 Post Reply ✓ answered by bvdet I'll take a guess. You have anther file named "random.py" on the Python path that is read before the random module is reached.