Python Cheat Sheet
Python Cheat Sheet
com
OverAPI.com Python jQuery NodeJS PHP Java Ruby Javascript ActionScript CSS Express More » Search
tan(x) gauss(mu,sigma)
os Variables lognormvariate(mu,sigma)
altsep normalvariate(mu,sigma)
Angular Conversion vonmisesvariate(mu,kappa)
degrees(x)
Alternative sep Special M
curdir paretovariate(alpha) __new__(c
radians(x) weibullvariate(alpha,beta)
Current dir string __lt__(self,
Hyperbolic Functions defpath
Default search path
String __init__(se
acosh(x) __le__(self
asinh(x)
atanh(x)
devnull
Path of null device
Formatting __del__(se
extsep __gt__(self
cosh(x) Formatting Operations
sinh(x) Extension separator
linesep
Date 'd'
__repr__(s
__ge__(sel
tanh(x) Signed integer decimal.
Line separator
name
Formatting 'i'
__str__(sel
__eq__(sel
Constants Signed integer decimal.
math.pi
Name of OS
Date Formatting 'o' __cmp__(s
The mathematical constant π = pardir %a Signed octal value. __ne__(sel
3.141592..., to available precisi Parent dir string __index__(
Abbreviated weekday (Sun) 'u'
on. pathsep %A Obsolete type – it is identical to __nonzero
math.e Patch separator
Weekday (Sunday) 'd'. __hash__(s
The mathematical constant e = sep %b 'x'
Path separator
__getattr__
2.718281..., to available precisi Abbreviated month name (Jan) Signed hexadecimal (lowercas
on. __getattrib
%B e).
__setattr__
Month name (January) 'X' __delattr__
%c Signed hexadecimal (uppercas
e). __call__(se
Date and time
%d 'e'
Day (leading zeros) (01 to 31) Floating point exponential form
%H at (lowercase).
24 hour (leading zeros) (00 to 2 'E'
3) Floating point exponential form
%I at (uppercase).
12 hour (leading zeros) (01 to 1 'f'
2) Floating point decimal format.
%j 'F'
Day of year (001 to 366) Floating point decimal format.
%m 'g'
Month (01 to 12) Floating point format. Uses low
%M ercase exponential format if exp
Shop Nowis less than -4 or not less
onent
Minute (00 to 59)
https://overapi.com/python 1/2
15/09/2022, 15:11 Python Cheat Sheet | OverAPI.com
%p than precision, decimal format
OverAPI.com Python jQuery NodeJS PHP Java Ruby Javascript ActionScript
AM or PM CSS Express More » Search
otherwise.
%S 'G'
Second (00 to 61?) Floating point format. Uses upp
%U ercase exponential format if exp
Week number1 (00 to 53) onent is less than -4 or not less
than precision, decimal format
%w otherwise.
Weekday2 (0 to 6)
'c'
%W Single character (accepts integ
Week number3 (00 to 53) er or single character string).
%x 'r'
Date String (converts any Python obj
%X ect using repr().
Time 's'
%y String (converts any Python obj
Year without century (00 to 99) ect using str()
%Y '%'
Year (2008) No argument is converted, resul
%Z ts in a '%' character in the resul
Time zone (GMT) t.
%%
A literal "%" character (%)
Shop Now
https://overapi.com/python 2/2