In this code, we will find out the second largest number from a list of integer numbers. There are several ways to do this. The first approach is as follows lst = [34, 56, 56, 56, 45, 2, 4, 12, 45] x= for i in lst: if i not in x: x.append(i) lar = max(x) […]
Printing Character Triangle using Python String slicing and for loop. The program is short easy to understand and implement
These code snippets discusses how to count vowels in string python using different methods. Old school methods as well as python way
Add a comment in each file of a folder is a very simple yet effective python program that add comment at the top of a python file recursively.
Python Code to Count Frequency of Word using python dictionary and simple looping method. Here the frequency of a word is taken as the key and words as values.
In this example, We will learn to generate Armstrong numbers between two numbers. This program uses the same function to determine to check Armstrong number. The source code of the function to check Armstrong number is def armstrong(n): m = n sum = 0 while(n != 0): rem = n % 10 sum += rem**3 […]