Show Menu
Cheatography

Python Cheat Sheet (DRAFT) by

Python cheatsheet for basic python

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

FUNCTION

Functions Functions are named blocks of code,
A simple function
def greet_­user():  "­"­"­Display a simple greeti­ng."­"­"­  print(­"­Hel­lo!­") greet_­user()
designed to do one specific job. Inform­ation passed to a function is called an argument, and inform­ation received by a function
is called a parameter
 

Variables and Strings

Variables are used to store values. A string is a series of charac­ters, surrounded by single or double quotes.
Hello world
print(­"­Hello world!­")