Python anonymous or lambda function : Python Tutorial 17

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.

Read

Python Function : Python Tutorial 16

Suppose you need to find the factorial of a number and you wrote a loop to calculate it. Again in the same project, factorial calculation is required again for a different number. In this case, we can write one similar “for” loop as before . But don’t you think that it would be better if we write the “for” loop only for one time and on second case, we will just run it using a “name” ? That will be great, if factorial is required to calculate in thousands of places, we don’t have to duplicate the same code again and again. These types of “ reusable code block that performs a specific task” is known as function.

Read

Python break, continue and pass statement : Python Tutorial 15

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 next line after the body of the loop. If we use “break” inside a inner loop, the control will move to the outer loop.Let's take a look into the python break , continue and pass statements :.

Read

Python While and for loop : Python Tutorial 14

Loops are used in programming language to run a piece of code again and again. In this tutorial, we will check two types of looping in python - “while” loop and “for” loop.

Read

Python Conditional Statements : Python Tutorial 13

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.

Read

Python Dictionary Built in methods : Python Tutorial 12

In our previous tutorial, we have seen how to create a python dictionary and some built-in methods. In this tutorial, we will explore some more dictionary functions, methods and uses.

Read

Python Dictionary introduction : Python Tutorial : Part 11

In this tutorial, we will discuss Python dictionary and some built-in methods. A dictionary is a collection of (key- value) paired items. All elements of a dictionary are placed inside curly braces { }, each element is separated by a comma. The elements of a dictionary are unordered and using a key, we can get a value.

Read

Python set and built in methods : Python tutorial : Part 10

Python Set Introduction - Introduced in python 2.4, Python set is a unordered collection of unique immutable elements. The elements of a set can be anything- numbers, characters, alphabet, other sets etc. A set can be changed. We can add or remove items. We can also perform set operations like differences, intersections etc. between sets.

Read

Python Tutorial : Part 9 : Common Python String Methods

Common Python String Methods- In this tutorial, we will check some popular python String methods and their uses:.

Read