'Attribute Error while using random module

I am trying the below program, but getting Attribute error . Can someone help me solve this issue?

import random

print(random.randrange(1, 10))
Attribute error: partially initialized module 'random' has no attribute 'randrange'(most likely due to a circular import) 


Solution 1:[1]

Please check if you have named your file or srcipt as random.py , that is causing confusion with the random module .

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tabot Charles Bessong