Skip to content

This repository is a collection of Python exercises focusing on lists.

Notifications You must be signed in to change notification settings

pise-anuradha/python-list-problems

Repository files navigation

python-list-problems

  1. Write a Python program to sum all the items in a list.

  2. Write a Python program to multiply all the items in a list.

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

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

  5. Write a Python program to count the number of strings where the string length is 2 or more and the first and last character are same from a given list of strings.
    Sample List : ['abc', 'xyz', 'aba', '1221']

  6. Write a Python program to get a list, sorted in increasing order by the last element in each tuple from a given list of non-empty tuples.
    Sample List : [(2, 5), (1, 2), (4, 4), (2, 3), (2, 1)]

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

  8. Write a Python program to check a list is empty or not.

  9. Write a Python program to clone or copy a list.

  10. Write a Python program to find the list of words that are longer than n from a given list of words.

  11. Write a Python function that takes two lists and returns True if they have at least one common member.

  12. 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']

  13. Write a Python program to generate a 346 3D array whose each element is *.

  14. Write a Python program to print the numbers of a specified list after removing even numbers from it.

  15. Write a Python program to shuffle and print a specified list.

About

This repository is a collection of Python exercises focusing on lists.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages