82. Problem to get the list of prime numbers from a list.

In this Python list program, we will take a user input as a list and get the list of prime numbers in a given list with the help of the below-given steps.

List of prime numbers:

Steps to solve the program
  1. Take a list as input and create an empty list.
  2. Check whether the element from the given list is a prime number or not using for loop.
  3. If it is a prime number then add that element to the empty list.
  4. Print the list to see the output.

Output :

Related Articles

Count the total number of vowels in a list

List after removing n elements from both sides

Leave a Comment