In [ ]:
In [1]:
import pdict
In [2]:
pdict.manip
In [3]:
import pdict.manip
In [4]:
pdict.manip
Out[4]:
In [5]:
pdict.manip.add_defaults({2:3,10:10000}, {1:2, 2:2222})
Out[5]:
In [6]:
add_defaults({2:3,10:10000}, {1:2, 2:2222})
In [7]:
from pdict.manip import add_defaults
In [8]:
add_defaults({2:3,10:10000}, {1:2, 2:2222})
Out[8]:
In [11]:
from pdict.manip import *
In [12]:
import pdict.manip as pooo
In [ ]:
In [ ]:
In [11]:
w = [1,2,3]
w
Out[11]:
In [15]:
def f(*args):
print args[0]
In [18]:
f(1,2,3)
In [17]:
f(*w)
In [19]:
*w
In [20]:
d = {1:2, 10:20, 'sdf':'sans domicile fixe'}
In [21]:
d.keys()
Out[21]:
In [22]:
d.values()
Out[22]:
In [25]:
t = zip(d.keys(),d.values())
t
Out[25]:
In [28]:
{k:v for k,v in zip(d.keys(), d.values())}
Out[28]:
In [30]:
**d
In [33]:
def ff(a,b,c):
print a
print b
print c
In [34]:
ff((1,2),(3,4),('asd','asddddd'))
In [39]:
dict({1:111, 10:1000}, **d)
Out[39]:
In [38]:
d
Out[38]:
In [40]:
dict({1:111, 10:1000}, {4:44}, {5:55})
In [41]:
2**4
Out[41]:
In [42]:
2^4
Out[42]:
In [43]:
2^10
Out[43]:
In [62]:
[x^10 for x in range(20)]
Out[62]:
In [63]:
[x^1 for x in range(20)]
Out[63]:
In [64]:
[x^0 for x in range(20)]
Out[64]:
In [65]:
[x^2 for x in range(20)]
Out[65]:
In [66]:
[x^3 for x in range(20)]
Out[66]:
In [44]:
2.^10
In [45]:
2^10.
In [ ]: