Skip to content

Instantly share code, notes, and snippets.

@daoducvinh5c
daoducvinh5c / second_small_list.md
Created July 17, 2021 15:40 — forked from hossainlab/second_small_list.md
How To Find the Second Smallest Number in a List

This is a Python Program to find the Second Smallest number in a list.

Problem Description

The program takes a list and prints the second smallest number in the list.

Problem Solution

  1. Take in the number of elements and store it in a variable.
  2. Take in the elements of the list one by one.
  3. Sort the list in ascending order.
  4. Print the last element of the list.