def factorial(n):
result = n
for i in range(1,n):
result *= i
return result
When saving the tiddler, the indentation and new lines is often lost,- I've tried the tripple quotes to "freeze" the text without any luck.
Any advise?
B.R.Jørn
When saving the tiddler, the indentation and new lines is often lost,- I've tried the tripple quotes to "freeze" the text without any luck.
try thisdef factorial(n):
result = n
for i in range(1,n):
result *= i