Python
Total Marks 50
Q1. Write a Python function that takes a list and returns a new list with distinct
elements from the first list.
Sample List : [1,2,3,3,3,3,4,5]
Unique List : [1, 2, 3, 4, 5]
Q2. Write a Python program to count the number of strings from a given list of
strings. The string length is 2 or more and the first and last characters are the
same.
Sample List : ['abc', 'xyz', 'aba', '1221']
Expected Result : 2
Q3.Write a Python program to remove duplicates from a list
Q4. Write a Python program to print a specified list after removing the 0th, 4th
and 5th elements.
Sample List : ['Red', 'Green', 'White', 'Black', 'Pink', 'Yellow']
Expected Output : ['Green', 'White', 'Black']
Q5 Write a Python program to find the index of an item in a specified list.
Q6Write a Python program to append a list to the second list.
Q7 Write a Python program to find the second largest number in a list