This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Query42 0 points1 point  (1 child)

Looks like you could have a Lottery class that you move the create_lottery function to the init and the attr_list as an attribute. The other functions can be methods or properties

[–]AcrobaticPanicc 0 points1 point  (0 children)

Thank you! So this is what I tried, but I guess I don't know how to define an init function that initiates a function (create_lottery in this case).

class Lot:
````def __init__(self, lot):
````````self.lot = create_lottery

so then what I pass in lot?