print("Hello")
Hello
print(4+5)
9
|
x is y
|
x not y
|
x and y
|
x or y
|
|
list.append(a)
|
Append a to list
|
|
list.insert(i, a)
|
Insert a before ith item in list
|
|
list.sort()
|
Sort list
|
|
list.pop(i)
|
Remove i th item in list
|
|
Integer
|
-256, 15
|
|
String
|
"Hello", "apple"
|
|
Boolean
|
True, False
|
|
List
|
[ value, ... ]
|
|
Tuple
|
( value, ... )
|
|
int(expr) Converts expr to integer
|
|
str(expr) Converts expr to string
|
|
x + y
|
add
|
x - y
|
subtract
|
|
x * y
|
multiply
|
x / y
|
divide
|
|
x % y
|
modulus
|
x ** y
|
xy
|
|
x < y
|
Less
|
|
x <= y
|
Less or equal
|
|
x > y
|
Greater
|
|
x >= y
|
Greater or equal
|
|
x == y
|
Equal
|
|
x != y
|
Not equal
|
|
len(s)
|
length of s
|
|
s[i]
|
ith item in s (starts from 0)
|
|
s[start : end : step ]
|
slice s from start (included) to end (excluded) with increment step
|
|
s + t
|
concatenate s with t
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.