Python is a dynamically typed programming language with both imperative and functional features. Python source code is executed by the Python interpreter which internally compiles the code to bytecode for better performance.

Example Code

Here is an example of the 100 doors problem:

#!/usr/bin/env python

def doors (n):
	# Initialize an array
	doors = [False] * n
	# Process the doors
	for i in range(n):
		for j in range(i, n, i+1):
			doors[j] = not doors[j]
	# Print out the results
	for k, door in enumerate(doors):
		print "Door %d is" % (k+1), 'open.' if door else 'closed.'

# Call the function doors with n = 100

Why would I learn this language?

Python has a very clean syntax and a well thought out design.

It is used in many different areas of software engineering such as web programming, scientific and numerical computing, and comes with a large standard library. There are many third party libraries available too.

Python is used by many large organizations in many successful projects.

Starting Points

Beginner's Guide to Python
Learn to program using Python. A beginners guide which includes to links to many useful resources.
Learning to Program with Python
Learn to make a game of hangman from scratch.

Further Reading