rbt wrote:
How do I set up a function so that it can take an arbitrary number of arguments?

If you haven't already, you should check out the Tutorial:

http://docs.python.org/tut/node6.html#SECTION006730000000000000000

How might I make this dynamic so that it can handle any amount of expenses?

def tot_expenses(self, e0, e1, e2, e3):
    pass

py> class C(object): ... def tot_expenses(self, *expenses): ... print expenses ... py> C().tot_expenses(110, 24) (110, 24) py> C().tot_expenses(110, 24, 2, 56) (110, 24, 2, 56)

Steve
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to