Jul. 30, 2013

Python - Quick Guide

Python Basics

We have updated our "Python - Quick Guide". You can find it all in this post,
and at the top of the site. 
 
Please don't forget to subscribe to our twitter feed as well as our RSS feed. 

On the left side, we have a feedback button. We love to hear what you think,
so please use it to let us know if you have any questions, ideas, problems. 

If you like what you read, please take a moment to share it using the buttons
below.

Python - Quick Guide

This page will describe the basics of Python.

Click on the Title(s) to learn more.

You can see what the topics are about under each title.

An overview for beginners

Python Package Manager

Python web application frameworks

Python Checkers / Debugging

Python shell

Python Game

Python CMS

Web Applications

GUI Frameworks

How to setup Python on your computer

Check if Python is installed on the computer

Install Python on Linux, Mac OS X and Windows

Python Interpreter

Python Syntax

Text Editors

How to write Python programs

Download and Install Python

Installing Python

How do I run my code?

Python Shell

Simple Python Script

Python Variables

What is a variable?

How do I use variables?

Lists different variable types

Examples

Using the Python Interpreter

What is Python Interpreter?

How can I use Python Interactively?

Python Comments

Describes how comments works in Python

Shorter examples

Python Docstrings

What is a Docstring?

How should a Docstring look like?

How to access the Docstring

Docstring Examples

Keywords in Python

What are keywords?

List of keywords

Keywords Explained

Booleans in Python

What are Booleans?

Boolean Strings

Boolean and logical operators

Operators

Arithmetic

Comparison operators

Logical operators

Using math in Python

Calculator

Counting with variables

Counter

Counting with a While Loop

Multiplication table Script

Exception Handling in Python

What is an Exception?

Why use Exceptions?

Raising an Exception

Exception Errors

Exception Errors Examples

Set up exception handling blocks

Code Example

Try … except … else clause

Try … finally clause

Strings in Python

What is a string?

Accessing Strings

Quotes

Raw Strings

Concatenate Strings

Reverse Strings

Changing Upper and Lower Case Strings

Replace Strings

Repeat Strings

Split Strings

Startswith / Endswith

Strip Strings

Slicing Strings

Formatting Strings

Join Strings

Testing Strings

Built-in String Methods

Lists in Python

What is a List?

List Creation

List Length

List Append

List Insert

List Remove

List Extend

List Delete

List Keywords

List Reverse

List Sorting

List Split

List Indexing

List Slicing

List Loops

List Methods

List Examples

Dictionaries in Python

What is a Dictionary?

How to create a Dictionary?

Accessing / Getting values

Looping through a Dictionary

Updating a Dictionary

Delete a key / value

Example from Google Class

Dict Formatting

Common Dictionary Operations

Dictionary Manipulation in Python

Methods of Dictionary Objects

String Manipulation in Python

Methods of String objects

List Manipulation in Python

Methods of List objects

Loops

Why Loops?

For Loops

Example of a for loop

Loop through words

Using the range function

While Loop

Example of a While Loop

Count with While Loops

Eternal Loops

Nested Loops

Breaking out of Loops

Break Example

Continue

Continue Example

Pass

List Comprehensions in Python

Syntax

Examples

Create a list using loops and list comprehension

Parsing a file using list comprehension

Using list comprehension in functions

Functions

Why functions?

How do I create a function?

Examples

There is a Function - Cheat Sheet at the top of the page. 

Conditional statements in Python

How to use Conditional Statements

If Statement

Elif Statement

Else Statement

Examples

If..Elif..Else Statement

What are Conditions?

When to use a Condition?

Syntax Explained

Conditional Tests

Python If statement Code Block

Modules

What are Modules?

Different ways to import modules

Please see the Modules - Cheat Sheet at the top of the page

Reading and Writing Files in Python

File Types

Open ( )

File Modes

Create a text file

How to read a text file

Looping over a file object

File Handling Usages

With Statement

With Examples

Read a file line by line into an list

Splitting Lines

With Statement in Python

With Statement Overview

With Statement Usage

Python Style Rules

Semicolons

Line length

Parentheses

Indentation

Blank Lines

Whitespace

Shebang Line

Comments

and more...

Python Language Rules

pychecker

Imports

Packages

Exceptions

Global variables

Nested/Local/Inner Classes and Functions

List Comprehensions

Default Iterators and Operators

Generators

Lambda Functions

Conditional Expressions

and more...


Read more about: