58. Problem to select random numbers from the list.

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

Select random numbers from the list:

Steps to solve the program
  1. Take a list as input.
  2. Create an empty list and a variable.
  3. Import a random library to select random numbers from the list.
  4. Add those randomly generated numbers to the empty list.
  5. Print the list two see the output.

Output :

Related Articles

Insert items in the list at a specific location

Create a 3*3 grid with numbers

Leave a Comment