> s.name = ["a","b"] > s.value = [3,5] > > I get error that s is not defined. How do I define s and proceed to > give its attributes? Either you create a class and use __init__: class S: def __init__(self, name, value): self.name = name self.value = value
or create a generic object and stick attributes to it: class Object(object): pass s = Object() s.name = ["a","b"] s.value = [3,5] I highly recommend going over the tutorial - http://docs.python.org/tutorial/ -- http://mail.python.org/mailman/listinfo/python-list