0
Def val_lst?
What is the output of this code? def val_lst(): return [x + y for x in 'spam' for y in 'SPAM'] print(len(val_lst())) Output: 16 spam + SPAM is 8? Where does it say to multiply? Thanks for any help.
2 Answers
+ 1
Here one cycle of 4 characters is nested in another cycle of 4 characters: "4+4+4+4".
val_lst()=[
sS, sP, sA, sM,
pS, pP, pA, pM,
aS, aP, aA, aM,
mS, mP, mA, mM]
0
I see. Thanks Vas:).