Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 913 Bytes

File metadata and controls

47 lines (38 loc) · 913 Bytes

Integers (int)

x + y Add x - y Subtract x * y Multiply x / y Divide (produces a float) x // y Floor Divide (produces an integer) x % y Modulo (remainder) x ** y Power x << n Bit shift left x >> n Bit shift right x & y Bit-wise AND x | y Bit-wise OR x ^ y Bit-wise XOR ~x Bit-wise NOT abs(x) Absolute value

Float

x + y Add x - y Subtract x * y Multiply x / y Divide x // y Floor Divide x % y Modulo x ** y Power abs(x) Absolute Value

Strings

Escape codes

'\n' Line feed '\r' Carriage return '\t' Tab ''' Literal single quote '"' Literal double quote '\' Literal backslash

String Representation

a = '\xf1' # a = 'ñ' b = '\u2200' # b = '∀' c = '\U0001D122' # c = '𝄢' d = '\N{FOR ALL}' # d = '∀'

https://unicode.org/charts/