Python 3 Beginner's Reference Cheat Sheet Alvaro Sebastian Legend: x,y stand for any kind of data values, s for a string, n for a number, L for a list where i,j are list indexes, D stands for a dictionary and k is a dictionary key. Reading and writing files f = open(,'w') f.write f.close. File = open('Hello.txt', 'a') # open in append mode file.write('Hello World again') file.close.
Python 3 Quick Reference Card
Field Width and Alignment
Python String Library Cheat Sheet


  | |
  | Output:   | 
  | Output:   | 
Member and Element Access
Python String Methods Cheat Sheet Pdf
  | Output:   | 
  | Implicit positional arguments (2.7 and above only)  | 
  | Access keyword arguments by name  | 
  | Access element by index  | 
  | Access element attribute  | 
  | Access element by key  | 
Numerical Representation
  | Output:   | 
  | Output:   | 
  | Output:   | 
  | Output:   | 
  | Output:   | 
  | Output:   | 
  | Output:   | 
  | Output:   | 
  | Like   | 
  | Exponent notation  | 
  | Exponent notation (capital 'E')  | 
  | Fixed point  | 
  | General format  | 
  | Percentage  | 
  | Precision  | 


Conversions
  | Output:   | 
  | Output:   | 

