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
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 find largest number in an array
Write a Java program to find the area of a triangle.
Write a Java program to accept a float value of number and return a rounded float value
Write a Java program to print the sum of two numbers
Write a Python Program to Find the Factorial of a Number.
Write a Python program to calculate the sum of three given numbers. If the values are equal, return three times their sum.
Write a Python Program to find the factorial of a number using recursion
Write a Python Program to Convert Decimal to Binary, Octal and Hexadecimal.
Write a Python Program to Print all Prime Numbers in an Interval of 1-10.
Java Quiz - 3
Java Quiz - 17
Java Quiz - 10
Java Quiz - 19
Java Quiz - 8