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