Read up on Class and Instance Variables in the Python Docs to get clarification on your specific confusion.
Generally speaking, instance variables are for data unique to each instance and class variables are for attributes and methods shared by all instances of the class:
class Dog:
kind = 'canine' # class variable shared by all instances
def __init__(self, name):
self.name = name # instance variable unique to each instance
>>> d = Dog('Fido')
>>> e = Dog('Buddy')
>>> d.kind # shared by all dogs 'canine'
>>> e.kind # shared by all dogs 'canine'
>>> d.name # unique to d 'Fido'
>>> e.name # unique to e 'Buddy' ```
What you are looking for, as @rassar suggested, is:
class Obj:
def __init__(self):
self.x = random.randint(1,1000)
a = Obj()
b = Obj()
c = Obj()
print(a.x, b.x, c.x)