recursion

Gigs_ gigs at hi.t-com.hr
Thu Sep 13 09:59:07 EDT 2007


Can someone explain me this

 >>> def f(l):
	if l == []:
		return []
	else:
		return f(l[1:]) + l[:1]  # <= cant figure this, how is all sum at the end?



thanks!



More information about the Python-list mailing list