I'm working on Exercise 4 from Part 4 from Learning Python. I'm trying to write a function using **args. I want to create a function that adds its arguments together. Here is what I have written:
def adder(**args): for x in args.keys(): print x print adder() print "---" print adder(a=5) print "---" print adder(a=5,b=6) print "---" print adder(a=5,b=6,c=7) print "---" print adder(ugly=7, good=6, bad=5) print "---" Here is my output: None --- a None --- a b None --- a c b None --- ugly bad good None --- Where do the None objects come from? _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor