passing what a function returns to another function

Miki Tebeka miki.tebeka at
Sun Feb 8 10:02:42 CET 2004

Hello Bart,

> I have 2 functions among others. One gets a URL and returns its, For
> example, it returns '' How can I pass this to another
> function? I've never worked with code that has lots of functions before.
You can either use a varible to store the 1'st result and pass it to
the 2'nd function of call the 1'st function directly as a parameter:

>>> def double(x):
	return x * 2

>>> def triple(x):
	return x * 3
>>> a = double(2)
>>> triple(a)
>>> triple(double(2))


More information about the Python-list mailing list