List comprehension Problem- with Python Solution

Lets say you have a list stored in a variable a = [ 12,3,45,6,6,45,123,345,67,78,43,23,567,87,9,23,8,4]. You are required to write only one line of python code that is able to generate a new list that contains only even numbers. The simple iterative solution is like this # Program to find and display all the even numbers […]

Common elements of Two list- Python Code

You are required to take two lists, say for example these two: a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] and write a program that returns a list that contains only the elements that are […]

Search a Word in Text File – Python Way

Search a word in text File python way is our attempt to search any word in text file nbot using old fashion way like we do in C/C++. Only 4 line code was able to perform the task.

Frequency of element in a list using Dictionary

Suppose a list of number is available to you. you are requested to find out the frequency of these elements available in this list using a dictionary. Dictionary is a data type available in python that can contain unsorted items using keys. The combination of key and value define a dictionary. After the execution of […]

Find out frequency of unique numbers in a list

Python program to find out the frequency of unique number using python list and python dictionary. There are very little difference between the working

Selection sort Python Program

Selection sort python program for class 12 computer science students. This progam in written to arrange a list of integer element in ascending order

Bubble Sort Python Program using List

Bubble Sort Python Program using List for class 12 computer science students. This program is used to arrange list elements in ascending order.

Python Implemented Queue [ code included ]

Python Implemented queue for class 12 Computer Science students using list data type. This is simple queue program implemented using python functions