import heapq def myfun(): list1 = [12, 34, 67, 98, 90, 68, 55, 54, 64, 35] list2= heapq.nsmallest(5, list1) print(list2) if __name__=="__main__": myfun()
[12, 34, 35, 54, 55]
Java Interview Questions
Python Interview Questions
Oracle Interview Questions
100 Most Asked Java Interview Questions and Answers
HR Interview Questions and Answers
Top 50 OOPS Interview Questions & Answers
Apply For Job
Java Material
Python Material
PLSQL Material
.Net Material
Java Practice Programs
400 Java Programs
Add all the digits of a given positive integer until the result has a single digit
Write a Java program to swap two variables
Write a java Program to check the given number is Palindrome or not
Write a Java program to compare two numbers
Write a Java program that accepts an integer (n) and computes the value of n+nn+nnn
Write a Python Program to Make a Simple Calculator with 4 basic mathematical operations.
Write a Python program that calculates the area of a circle based on the radius entered by the user.
Write a Python Program to Check if a Number is Positive, Negative or Zero.
Write a Python program that checks whether a specified value is contained within a group of values.
Write a Python Program to Find LCM.
Java Quiz - 10
Java Quiz - 21
Java Quiz - 13
Java Quiz - 16
Java Quiz - 7