Category Archives: Python Programming

Python Read File Into List

In this tutorial we are going to see how we can read a file and store the content of the file into a python list. While working with python many a times data is stored into text files or csv files and to use that data into our code it must be brought to the… Read More »

Python String Comparison

In this tutorial we are going to see different methods by which we can compare strings in Python. We will also see some tricky cases when the python string comparison can fail and golden rules to get string comparison always right. Python strings are Immutable.  This means that once you have created a string then… Read More »

How to Read and Write to JSON File in Python

In this tutorial we will go through the process of reading and writing JSON files in Python. While sending or receiving data between server it can only be text, so JSON (JavaScript Object Notation) is a data format used to convert JavaScript object to JSON and send it to the server. Python has a module… Read More »

Python Tic Tac Toe Game

In this tutorial we are going to see how we can implement the tic tac toe game in Python. We can either make use of random numbers for the computer move or we can develop a simple algorithm which will play the role of a computer.  Let us first see the representation of our board.… Read More »

Python Send Email Using SMTP

In this tutorial we will see how to send email using Python. We will need two python libraries for the same, smtplib will be used for making a host for sending email it will also handle routing of email between different servers. email package allows us to use HTML and other kind of text in… Read More »

Python NoneType

In this tutorial we are going to discuss about Python NoneType. Before we start discussion on NoneType let us first see what is an object. In any programming language preliminary data types are int, float, char etc. and we can create a class by mixing different data types together and the instances of these classes… Read More »

Python Check Variable Type – 3 Ways

In this tutorial we are going to learn how to check variable type in Python.  One of the features of Python is it uses Dynamic data type. It means we need not to specify which type of data the variable is going to hold. One time in our code a variable can hold integer later… Read More »