Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

Python List Exercise

The document outlines several Python programming tasks including finding the largest and smallest numbers in a list, counting specific strings based on criteria, removing duplicates, finding common elements between two lists, calculating frequency of elements, and counting elements within a specified range. Each task is described with a brief explanation and, in some cases, sample input and expected output. These tasks aim to enhance programming skills and understanding of list manipulation in Python.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Python List Exercise

The document outlines several Python programming tasks including finding the largest and smallest numbers in a list, counting specific strings based on criteria, removing duplicates, finding common elements between two lists, calculating frequency of elements, and counting elements within a specified range. Each task is described with a brief explanation and, in some cases, sample input and expected output. These tasks aim to enhance programming skills and understanding of list manipulation in Python.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Write a Python program to get the largest number from a list.

2. Write a Python program to get the smallest number from a list.


3. Write a Python program to count the number of strings from a given list
of strings. The string length is 3 or more and the first and last characters
are the same.
Sample List : ['abc', 'xyzx', 'aba', '11',’Er4wq’]
Expected Result : 2

4. Write a Python program to remove duplicates from a list.

5. Write a Python function that takes two lists and returns common
members if they have.

6. Write a Python program that takes a lists and returns the frequency of
occurrence of each member.

7. Write a Python program to count the number of elements in a list within


a specified range including both extremes.

Eg –
L1 = [10, 20, 30, 40, 40, 40, 70, 80, 99]
Range – 30-80
Result- 6

You might also like