Académique Documents
Professionnel Documents
Culture Documents
argv
__new__(cls)
__lt__(self, other)
istitle() *
title() *
builtin_module_names
Linked C modules
__init__(self, args)
__le__(self, other)
isupper() *
translate(table)
byteorder
__del__(self)
__gt__(self, other)
join()
upper() *
check_interval
Signal check
__repr__(self)
__ge__(self, other)
ljust(width)
zfill(width)
frequency
__str__(self)
__eq__(self, other)
lower() *
exec_prefix
Root directory
__cmp__(self, other)
__ne__(self, other)
executable
Name of executable
__index__(self)
__nonzero__(self)
bit strings.
exitfunc
modules
Loaded modules
path
Search path
platform
Current platform
__delattr__(self, name)
version_info
winver
Version number
__hash__(self)
__getattr__(self, name)
__getattribute__(self, name)
__setattr__(self, name, attr)
append(item)
pop(position)
sys.argv[0]
foo.py
count(item)
remove(item)
sys.argv[1]
bar
extend(list)
reverse()
sys.argv[2]
-c
index(item)
sort()
sys.argv[3]
qux
insert(position, item)
sys.argv[4]
--h
close()
readlines(size)
flush()
seek(offset)
fileno()
tell()
isatty()
truncate(size)
next()
write(string)
read(size)
writelines(list)
readline(size)
Python Indexes and Slices
len(a)
a[0]
a[5]
a[-1]
capitalize() *
lstrip()
a[-2]
center(width)
partition(sep)
a[1:]
[1,2,3,4,5]
replace(old, new)
a[:5]
[0,1,2,3,4]
decode()
a[:-2]
[0,1,2,3]
encode()
a[1:3]
[1,2]
endswith(sub)
rjust(width)
a[1:-1]
[1,2,3,4]
expandtabs()
rpartition(sep)
b=a[:]
Shallow copy of a
rsplit(sep)
rstrip()
isalnum() *
split(sep)
isalpha() *
splitlines()
today()
fromordinal(ordinal)
isdigit() *
startswith(sub)
now(timezoneinfo)
combine(date, time)
islower() *
strip()
utcnow()
strptime(date, format)
isspace() *
swapcase() *
fromtimestamp(timestamp)
Python os Variables
altsep
Alternative sep
curdir
defpath
devnull
extsep
Extension separator
linesep
Line separator
name
Name of OS
pardir
pathsep
Patch separator
sep
Path separator
utcfromtimestamp(timestamp)
Sponsored by Readability-Score.com
cheatography.com/davechild/
www.getpostcookie.com
Page 1 of 2.
https://readability-score.com
utcoffset()
isoformat()
dst()
__str__()
tzname()
strftime(format)
Python Date Formatting
%a
%A
Weekday (Sunday)
%b
%B
%c
%d
%H
%I
%j
%m
%M
%p
AM or PM
%S
%U
%w
Weekday (0 to 6)
%W
%x
Date
%X
Time
%y
%Y
Year (2008)
%Z
%%
Sponsored by Readability-Score.com
cheatography.com/davechild/
www.getpostcookie.com
Page 2 of 2.
https://readability-score.com