i’m stuck on this problem, please provide me a solution.
You are given three distinct integers. Print all the possible combinations of these integers as a nested list. The combinations should not contain any repetition of the entered integers and the sum of the integers in resultant combinations should be an even number, means exclude all other combinations whose sum doesn’t equals to an even number.
Note:
Refer to the Displayed test cases for a better understanding Use list comprehension to solve the problem
Constraints:
1 integers 1000
Sample Test Case:
1 Enter integers
2
3
1.2.3 11.3.22 1321131.23. 2, 1]]> Return all the non-repeated combinations of the integers whose sum is an even number
Explanation:
In the given test case, the sum of all the lists within the list is the even number
Santlaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2