[Tutor] Random module error

Kent Johnson kent37 at tds.net
Thu May 15 14:00:00 CEST 2008


On Thu, May 15, 2008 at 3:00 AM, Guess?!? <wtfwhoami at gmail.com> wrote:
> Hello All,
>
> I am importing module "random" and it is giving me this error
> below  AttributeError: 'module' object has no attribute 'randrange'

You have named your program random.py. The import finds your program
rather than the random module. Rename your program and delete the
associated .pyc file and it will work.

Kent


More information about the Tutor mailing list