print "Hi" ? import collections collections.namedtuple? collections.Counter?? *int*? %quickref collections. 2+10 _+10 10+20; _ _10 == Out[10] print 'last output:', _ print 'next one :', __ print 'and next :', ___ In[11] _i _ii print 'last input:', _i print 'next one :', _ii print 'and next :', _iii %history -n 1-5 !pwd files = !ls print "My current directory's files:" print files !echo $files !echo {files[0].upper()} import os for i,f in enumerate(files): if f.endswith('ipynb'): !echo {"%02d" % i} - "{os.path.splitext(f)[0]}" else: print '--' %magic %timeit range(10) %%timeit range(10) range(100) for i in range(5): size = i*100 print 'size:',size, %timeit range(size) %%bash echo "My shell is:" $SHELL echo "My memory status is:" free %%writefile test.txt This is a test file! It can contain anything I want... And more... !cat test.txt %lsmagic >>> # Fibonacci series: ... # the sum of two elements defines the next ... a, b = 0, 1 >>> while b < 10: ... print b ... a, b = b, a+b In [1]: for i in range(10): ...: print i, ...: %%writefile mod.py def f(x): return 1.0/(x-1) def g(y): return f(y+1) import mod mod.g(0) mod.g(0) %debug enjoy = raw_input('Are you enjoying this tutorial ?') print 'enjoy is :', enjoy %%perl @months = ("July", "August", "September"); print $months[0]; %%ruby name = "world" puts "Hello #{name.capitalize}!" %connect_info %qtconsole