pythonic way of 'b = list(a); b.append(4)"

Paul Rubin http
Thu Feb 16 11:17:23 EST 2006


"szabi" <szabolcs.berecz at gmail.com> writes:
> I have a list of three values and want to call a function with four
> parameters. I would like
> to write something like:
> 
> a = [1, 2, 3]
> f(*a, 4)

f(*a+[4]) seems to work.



More information about the Python-list mailing list