Answer to Question #93273 in Python for angara dhanakeerthi

Question #93273
What is the value of pairs after the following assignment?
pairs = [ (x,y) for x in range(3,0,-1) for y in range(2,0,-1) if (x+y)%3 == 0 ]
1
Expert's answer
2019-08-26T06:37:28-0400
pairs = [(2, 1), (1, 2)]

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS