In [ ]:
from PIL import Image
In [ ]:
print('hello')
In [ ]:
dir(str)
In [ ]:
set(dir(str))-set(dir(bytes))
In [ ]:
!ls
In [ ]:
"this,that,those,these".split(",")
In [ ]:
"this,that,those,these".split(",")[2]
In [ ]:
a = "this,that,those,these,others".split(",")
In [ ]:
a
In [ ]:
type(a)
In [ ]:
"|".join(a)
In [ ]:
"|".join([t.title() for t in a if t.count('') > 5])
In [ ]:
"|".join(map(lambda x: x.title(),a))
In [ ]:
iter(range(4))
In [ ]:
list(iter(range(4)))
In [ ]:
g = iter(range(4))
In [ ]:
next(g)
In [ ]:
next(g)
In [ ]:
h = {'spam':6,'eggs':5}
In [ ]:
h['spam']
In [ ]:
j=dict(this=5,that=10,sub=[5,6,7])
In [ ]:
j
In [ ]:
j['sub'][1]
In [ ]:
j.items()
In [ ]:
tuple('this')
In [ ]:
s1 = set('this')
s2 = set('those')
In [ ]:
s1
In [ ]:
s2
In [ ]:
s1-s2
In [ ]:
s2-s1
In [ ]:
s1|s2
In [ ]:
s1 & s2
In [ ]:
s1 >= s2
In [ ]:
s1 ^ s2
In [ ]:
_
In [ ]:
a,*b = [1,2,3,4]
In [ ]:
a
In [ ]:
b
In [ ]:
In [ ]:
a,*b, c = [1,2,3,4]
In [ ]:
a
In [ ]:
b
In [ ]:
c
In [ ]:
l = lambda a, b: a * b + 1
In [ ]:
l
In [ ]:
l(5,6)
In [ ]:
sys.path
In [ ]:
sys.modules
In [ ]: