Show Menu
Cheatography

Python Cheat Sheet (DRAFT) by

Python

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Benchm­arking

import time

def functionName():
   start = time.time()

   # function body
   ret = funcReturn

   end = time.time()

   return ret, end - start

Linear Data Structures

Linear
Once an item is added, it stays in that position relative to the other elements that came before and came after it.