defining functions
Patio87
patio87 at aol.com
Sun Feb 10 21:41:59 EST 2002
More information about the Python-list mailing list
Sun Feb 10 21:41:59 EST 2002
- Previous message (by thread): Bug or feature? 'abc'.split('') rejects empty separator
- Next message (by thread): defining functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I am pretty new to python, and I dont understand the parameters when defining
functions. Whenever I see a function definition with a argument It seems like
the argument already is a variable, but it goes threw the function and it makes
no sense. I dont know if what I just said made any sence but if you can help me
please reply
def factorial(n):
if n == 1:
return 1
else:
return n * factorial(n-1)
What the hell does 'n' have assingned to it?
- Previous message (by thread): Bug or feature? 'abc'.split('') rejects empty separator
- Next message (by thread): defining functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list