Hello there; If I have a class and want to initalise it, with random values assigned to the attributes, what is the best way of doing this?
For example: def __init__(self, name, size = 0, strength = 0): self.name = name self.size = size self.strength = strength starts with values of 0. But how can I neatly say, start with a random value from (for example) 1 - 5? thanks Max ___________________________________________________________ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor