Intermediate List
Intermediate List
Q1. Given a two Python list. Write a program to iterate both lists simultaneously and display items
from list1 in original order and items from list2 in reverse order.
List1=[100,200,300,400]
List2=[1,2,3,4]
Output- 100 4
200 3
300 2
400 1
List1=[“Good” , “Night”]
List2=[“morning”, “Evevning”]
Q.3 Write a program to add two lists index-wise. Create a new list that contains the
0th index item from both the list, then the 1st index item, and so on till the last
element. any leftover items will get added at the end of the new list.
list1 = ["a", "b", ["c", ["d", "e", ["f", "g"], "k"], "l"], "m", "n"]
Expected Output: ['a', 'b', ['c', ['d', 'e', ['f', 'g', 'h', 'i', 'j'], 'k'], 'l'], 'm', 'n']
Q5. Write a Python program to print a specified list after removing the 0th, 4th and
5th elements
List = ['Red', 'Green', 'White', 'Black', 'Pink', 'Yellow']
Expected Output : ['Green', 'White', 'Black']
Q6.Make a list by taking 10 input from user. Now delete all repeated elements of the list.
E.g.-
INPUT : [1,2,3,2,1,3,12,12,32]
Intermediate
OUTPUT : [1,2,3,12,32]
Q7. Write a Python program to count the number of elements in a list within a
specified range.(5-11)
List1=[1,2,3,2,1,3,12,12,32,64,60,67,22]