0

I just dicovered that a function can be defined in the following ways:

def f(x=2):
    print x

and

def f(x=2,):
    print x

Is there a difference between the version with and without the comma? if so, what is the difference between those two definitions?

Antonio Ragagnin
  • 2,278
  • 4
  • 24
  • 39

0 Answers0