Jan-26-2021, 07:12 PM
(Jan-26-2021, 06:47 PM)nilamo Wrote:Oh I understood thanks !(Jan-26-2021, 06:34 PM)quest_ Wrote: Apologize but I did not understand anyhting. Why are we seeing "spam foo 3" instead of "spam foo" when we run "show(*items)"
Becauseshow()
is always printinga
,b
, andc
. The list that was expanded only had 2 elements, so onlya
andb
had values coming from the list, whilec
still had it's default value as defined in the argument list:def show(a=1, b=2, c=3):
Quote:What value doesa = kron(*kron_argument_list([i for i in range(qbt)]))I have this error:
Error:TypeError: 'tuple' object cannot be interpreted as an integerqbt
have? I think the error is coming fromrange(qbt)
, and thatqbt
is a tuple at that point.
I just confused the name of list sorry it is now working!