Create a new list from a two list using the following condition
Create a new list from a two list using the following condition
Given a two list of numbers, write a program to create a new list such that the new list should contain odd numbers from the first list and even numbers from the second list.
Given:
Expected Output:
result list: [25, 35, 40, 60, 90]
Hint:
result_list
num % 2 != 0
formula. If the current number is an odd number, add it to the result listnum % 2 == 0
formula. If the current number is an even number, add it to the result listSolution:
need an explanation for this answer? contact us directly to get an explanation for this answer