## Python Program to count the number of vowels in a string!

Here is another interesting Python program which will take a word or sentence as an input (basically a string) and return the number of vowels present in it. There are numerous way you can write a Python program to count… Continue Reading

## Python program to find prime number or not!

Hello people, here I am writing a Python programme after a very long time. This programme could be useful for cracking interviews or could be useful for school / college students who wish to learn the basic of Python programming. This… Continue Reading

## How to get Unix Timestamp in Python

To print timestamp in Python is very simple, all you have to do is, import the time library and call the time() function to get the timestamp. But the problem most of us facing is where it will return a float… Continue Reading

## Python Factorial Program

This is a basic Python program which helps school and college students to improve their knowledge in Python. If you don’t know what is factorial, here is a small explanation, Multiplying given integer with the sequence of descending positive integers is called factorial.… Continue Reading

## Read a file in Python and find number of Lines

Reading a file in Python is very simple, In this tutorial you are going to see how to read a file as well as count the number of lines in a text file in Python. See the code here:

## Calculate hours, minutes between two times in Python

I’m basically a PHP developer, but there was a situation where I have to work with a Python script, you know what? I have to find hours between two times, but that was not so easy for me. Even I… Continue Reading

## Reverse a string without using build in method [::-1] in Python

If you are new to Python and you don’t know how to reverse a string in Python, here is a sample script using default reverse method [::-1]:

The output of the above program: Enter a String superman Reverse is:… Continue Reading

## Python program to convert Fahrenheit to Celsius

In this lesson you are going to learn how to convert Fahrenheit to Celsius by using Python script, I’m following Python 3 syntax to write programs which actually works in both Python 2 and Python 3. Formula for finding the… Continue Reading

## Python program to find Armstrong number

In this Python example you are going to learn how to find a number is an Armstrong number or not. An “Armstrong number” is a number that is equal to the sum of the nth powers of its individual digits. For example,… Continue Reading

## Python program to find Palindrome

This python example script will help you to find out the entered string is a palindrome or not. The logic is reversing the original string and comparing both the original and reversed string. Here is the script (palidrome.py): The… Continue Reading