Python Functions

So far we have seen using python created function for various purpose such as to know the length of list, sort list elements, print information etc. Can we create our own function? Yes. We can create our function in Python. Syntax def function_name(): //required code to accomplish a task User defined function should always begin […]

Python Set

Alike list and tuple, there is another kind of data type exist in python and that is Set. Set is unordered and unindexed. It means alike list and tuple, we can not access the elements of set using index number. Example: fruitnames={“Orange”,”Banana”,”Grape”} How to access elements of Set? By using for loop, we can print […]

Python Dictionary

There are situations where we may want to store key and value pair data in a variable. Dictionary Dictionary in python: Variable which holds data in key and value pair form is known as dictionary. Example: registration_numbers={“Rahul”:”99ik89lm”, “Ajay”:”99ik90lm”, “Vijay”:”99ik91lm”, “Sachin”:”99ik92lm”, “Krishna”:”99ik933lm”} How to print data from a dictionary variable in python? To print a value […]

Python Tuple

Python tuples are useful for listing elements (Objects). Tuple is quite similar to list but it has a difference. Tuple is slightly different than list. (I have discussed about list in one of the previous chapter) What is tuple? Tuple is collection of elements or objects. Objects of tuples are ordered in certain sequence. Which […]

Python List

List in Python programming is a type of variable which holds one or more than one elements. List Declaration We can use any name that has no space or any special character to declare a variable of type list. Example fruitnames=[“Orange”,”Banana”,”Grape”,”Pine Apple”,”Jackfruit”] roll_numbers=[101,102,103,104,105] While declaring list, square brackets are important. The starting square bracket, and […]

Python Loops

If a task is repetitive then its a loop. For example, if I want to print 100 for 100 times, then there are 100 loops. If I want to print all the names of class tenth 250 students, then here 250 loops are there. Now imagine, I need to print 10000 times the addition value […]

Python Different types of Operators

Operators in python programming are essential to perform various operations with more than one operands. For example, to perform addition operation between two the values of two variables we use addition operator. Similarly for subtraction we have subtraction operator. Lets know all these operator one by one. Addition Operator + Addition operator performs addition operation. […]

Python Data Types

In one of the previous tutorial, I have discussed about variable declaration. Variable are declared to store values in it. We can store different types of values in a variable. Lets learn in this tutorial, what are the different types of data we can store in a variable. String String data type are the general […]

Python Handling Conditional Operations

One of the powerful and of course a very important concept is conditional operations. For instance, lets consider the case of facebook login. Can you guess, how it functions? (Avoid in depth analysis, just focus on over all function.) Very simple. If a user has logged in with valid user name and password, show him […]

Python Variable Declaration

In previous tutorial, I had mentioned how to create a python file and run it. Lets move a step further and lets understand what is a variable and how to declare it. Lets consider a situation. Suppose in my program code, I need to print 5 times the addition value of 5 and 10. Therefore […]

Python Introduction

Python is one of the popular programming language. It is bit different than any other programming language such as java, c, c++,.net,c# etc. And since last one and half decade python has gained the most fame in the world of coding. Especially in web scraping, machine learning and data mining python is heavily used. Because […]