Answer to Question #151995 in Python for Aishwarya

Question #151995
pairs=[(x,y) for x in range(4) for y in range (3) if (x+y)%2!=0]
1
Expert's answer
2020-12-18T10:49:42-0500

It will print all x and y for which sum is not divisible by 2.

It will print [(0, 1), (1, 0), (1, 2), (2, 1), (3, 0), (3, 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