Python Programming Tutorials

Python Programming Tutorials And Articles
  Title / Author Replies
Strings and Lists are 2 important data types in the suite of structured data types in python. Strings and lists are similar, but they are not same and many people donít know the main difference between a string and a list in python. One simple difference between strings and lists is that lists can...
My cousin recently bought a Bomb Trap puzzle, he was crazy for solving that puzzle and tried a couple of times and often came to me for rechecking his solution, and me being lazy, I thought of making a simple python script to check his solutions and save me from the brain drain. The Code ...
Link Extractor as the name suggests, scrapes all the URLs from a particular webpage. In the following code the extractor can extract relative as well as absolute URL's from a HTML webpage, and outputs them is a more readable and useful format. The Code from BeautifulSoup import...
Sudoku is a logic based number-placement puzzle, The objective of the puzzle is to fill a n * n grid with digits so that :- Each column of the square contains each of the numbers from 1 to n exactly once. Each row of the square contains each of the numbers from 1 to n exactly once. The...
Run length Encoding also known as RLE is probably the most basic encoding method that's being used in different fields of computing like, Multimedia Formats etc. In this tutorial we'll be looking at how RLE works and a basic python example which implements RLE. How does it works Run length...
Sun Rasterfile also known as Sunrast is an image format developed by Sun Microsystems, It uses a version of Run Length Encoding to compress images. In this tutorial we'll be discussing how Sun Rasterfile's implementation of RLE is different from the basic vanila version and how is it used to...
A few years ago, people who wished to study programming as a hobby had an important decision to make: Which programming language would they study for their first? Many people chose to start with BASIC or Pascal, because they were easier. Indeed, those languages are fairly well-suited to...
In this tutorial we'll be making a small yet effective application rather code snippet to Lookup Any Username on Facebook. The Code Below Uses the Graph API, The Graph API (as defined by Facebook) is the core of Facebook Platform , It allows reading and Writing access to Facebook. It provides a...
Well, I was trying to use regular expressions in Python. I wrote a small script, so I thought I'll will post it and make it open for discussion. As I learn more I'll keep them posted too, and if anyone has any comments please do let me know. #!/usr/bin/python import re print...
Introduction There are two basic methods for sending an email with Python. If a mail server is running on the machine where Python is installed, simply open a pipe to the mail server and write the email as a file to that pipe. This is usually done on *nix type systems such as Linux. ...
Python supports a couple of looping constructs. The for statement is most commonly used. It loops over the elements of a sequence, assigning each to the loop variable. If the body of your loop is simple, the interpreter overhead of the for loop itself can be a substantial amount of the overhead....
Earlier today, I had posted a code snippet to print all the CGI environment variables in CGI-Perl. Well, I recently started learning Python too, so thought of doing the same in Python. Checkout the code below. #!/usr/bin/python import sys, os print "Content-Type: text/html\n\n"; ...