Show Menu
Cheatography

python2.7 basics Cheat Sheet (DRAFT) by

arithmetic, imports, iteration, strings

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

Convention

lower_case_variables = 5
lower_case_variables = 4
UPPER_CASE_CONSTANT = 5
 

Arithmetic

integer_example = 5
float_example = 4.5
 

Conver­sions

string_example = raw_input("please enter something here: ")
float_conversion = float(string_example)
int_conversion = int(string_example)