0
264views
Create a new list such that new list should contain only odd no from 1st list and even no from 2nd list.

Given a 2 list of no’s create a new list such that new list should contain only odd no’s from 1st list and even no’s from 2nd list.

1 Answer
0
5views

Create 2 list and add some values to the list & create an one empty list.

Iterate over the 1st list and if the element is odd then append to the empty list.

Iterate over the 2nd list and if the element is even then append to the empty list. …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.