Python program to find smallest number in a list Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report In this article, we will discuss various methods to find smallest number in a list. The simplest way to find the smallest number in a list is by using Python's built-in min() function.Using min()The min() function takes an iterable (like a list, typle etc.) and returns the smallest value. Python a = [8, 3, 5, 1, 9, 12] # Find the smallest number smallest = min(a) print(smallest) Output1 Let us explore different methods to find smallest number in a list.Table of ContentUsing a For LoopUsing SortingFrequently Asked Questions on Finding Smallest Number in ListUsing a For LoopWe can also find the smallest number in a list without using any built-in methods by using a loop (for loop). This method is useful for understanding how the comparison process works step by step. Python a = [8, 3, 5, 1, 9, 12] # Initialize "smallest" value with first element of list smallest = a[0] # Iterate through list to find smallest element for val in a: # If current value is smaller than current smallest value if val < smallest: # Update the smallest value smallest = val print(smallest) Output1 Using SortingAnother way to find the smallest number in a list is by sorting it. Once sorted in ascending order, the smallest number will be at the beginning of the list. Python a = [8, 3, 5, 1, 9, 12] a.sort() smallest = a[0] print(smallest) Output1 Explanation:The sort() function sorts the list in ascending order.After sorting, the first element (a[0]) will be the smallest.Note: This method is not recommended for finding the smallest number in a list. While it works but it is less efficient than using min() or a for loop. Sorting has a time complexity of O(n log n), whereas the other methods are O(n). Get Smaller Elements in Python Visit Course Comment More infoAdvertise with us Next Article Company Preparation S Shivam_k Follow Improve Article Tags : Python Python Programs python-list Python list-programs python +1 More Practice Tags : pythonpythonpython-list Similar Reads Interview PreparationInterview Preparation For Software DevelopersMust Coding Questions - Company-wise Must Do Coding Questions - Topic-wiseCompany-wise Practice ProblemsCompany PreparationCompetitive ProgrammingSoftware Design-PatternsCompany-wise Interview ExperienceExperienced - Interview ExperiencesInternship - Interview ExperiencesPractice @GeeksforgeeksProblem of the DayTopic-wise PracticeDifficulty Level - SchoolDifficulty Level - BasicDifficulty Level - EasyDifficulty Level - MediumDifficulty Level - HardLeaderboard !!Explore More...Data StructuresArraysLinked ListStackQueueBinary TreeBinary Search TreeHeapHashingGraphAdvance Data StructuresMatrixStringAll Data StructuresAlgorithmsAnalysis of AlgorithmsSearching AlgorithmsSorting AlgorithmsPattern SearchingGeometric AlgorithmsMathematical AlgorithmsRandomized AlgorithmsGreedy AlgorithmsDynamic ProgrammingDivide & ConquerBacktrackingBranch & BoundAll AlgorithmsProgramming LanguagesCC++JavaPythonC#Go LangSQLPHPScalaPerlKotlinWeb TechnologiesHTMLCSSJavaScriptBootstrapTailwind CSSAngularJSReactJSjQueryNodeJSPHPWeb DesignWeb BrowserFile FormatsComputer Science SubjectsOperating SystemsDBMSComputer NetworkComputer Organization & ArchitectureTOCCompiler DesignDigital Elec. & Logic DesignSoftware EngineeringEngineering MathematicsData Science & MLComplete Data Science CourseData Science TutorialMachine Learning TutorialDeep Learning TutorialNLP TutorialMachine Learning ProjectsData Analysis TutorialTutorial LibraryPython TutorialDjango TutorialPandas TutorialKivy TutorialTkinter TutorialOpenCV TutorialSelenium TutorialGATE CSGATE CS NotesGate CornerPrevious Year GATE PapersLast Minute Notes (LMNs)Important Topic For GATE CSGATE CoursePrevious Year Paper: CS exams Like