join at 0x7f8bb58a4f50> File: /usr/lib/python2.7/posixpath.py Definition: os.path.join(a, *p) Docstring: Join two or more pathname components, inserting '/' as needed. If any component is an absolute path, all previous path components will be discarded. An empty last part will result in a path that ends with a separator. >>>
File: /usr/lib/python2.7/posixpath.py Definition: os.path.join(a, *p) Source: def join(a, *p): """Join two or more pathname components, inserting '/' as needed. If any component is an absolute path, all previous path components will be discarded. An empty last part will result in a path that ends with a separator.""" path = a for b in p: <... resto do código omitido ...>
best of 3: 74.5 µs per loop >>> %timeit [str(l) for l in lista] 10000 loops, best of 3: 121 µs per loop >>> >>> import math >>> %time math.sqrt(3.456) CPU times: user 0 ns, sys: 0 ns, total: 0 ns Wall time: 13.1 µs 1.85903200617956 %time runs only once and shows the result (much like the Bash time builtin)
...: for e in collection: ...: print(e) ...: File "<ipython-input-8-17a426f52fc3>", line 4 for e in collection: ^ IndentationError: unindent does not match any outer indentation level If you want to paste code into IPython, try the %paste and %cpaste magic functions. >>>
you encounter problems, please install IPython inside the virtualenv. (env)$ pip install ipython (env)$ ipython WARNING: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv. (env)$ hash -r (env)$ ipython >>> print "Yay!" Yay!