Python program to check palindrome using one if-else : Python tutorial 22

Python Program to check if a string is a palindrome or not : What is a palindrome String ? A String which is same in both direction is called a palindrome string. If we reverse a palindrome String, it will remain same. e.g. “123454321” is a palindrome String but “12345” Read more…

Python File operations : Python Tutorial 21

Python File operations : Open, Close, Read , Write and Append to a file in Python : Python has functions and methods to manipulate files . No external library is required for doing file operations in python. In this tutorial, we will learn different python file operations like reading the Read more…

Python Program to find the factorial of a Number : Python Tutorial 20

Python program to find the factorial of a number using recursion : The factorial of a number is the product of all the numbers from 1 to that number. e.g. factorial of 5 is 1 * 2 * 3 * 4 * 5 i.e. 120 . In this tutorial, we will Read more…

Python anonymous or lambda function : Python Tutorial 17

Python anonymous or lambda function : Anonymous or lambda functions are functions without a name. In python, we can create an anonymous function using a construct called “lambda” unlike “def” keyword we use to create other functions.  Difference between normal function and lambda function : def function1(x) : return x Read more…

Python break, continue and pass statement : Python Tutorial 15

Python Break , continue and pass statement : Break and continue : In our last tutorial, we have seen that we can use “else” with “for” and “while” loop. Using “break”, we can stop the execution of a code block inside a loop. The control will next move to the Read more…

Python Conditional Statements : Python Tutorial 13

Python Conditional Statements : If – else statements are known as conditional statements. In simple words, if the condition defined for “if” block is true, then the block of statements defined for if block will execute. Otherwise, the code defined for “else” block will execute. As we have seen that Read more…