print("Hello") ? import collections collections.namedtuple? collections.Counter?? *int*? %quickref # type tab after the '.' below: collections. 2+10 _+10 10+20; _ _10 == Out[10] Out print('last output :', _) print('second to last :', __) print('third to last :', ___) In[11] _i _ii print('last input :', _i) print('second to last :', _ii) print('third to last :', _iii) %history !pwd files = !ls print("My current directory's files:") print(files) !echo $files !echo {files[0].upper()} %magic %timeit range(10) %%timeit range(10) range(100) for i in range(5): size = i*100 print('size:',size, end=' ') %timeit range(size) %%bash echo "My shell is:" $SHELL echo "User:" $USER %%file test.txt This is a test file! It can contain anything I want... 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(5): ...: print(i) ...: %matplotlib inline import numpy as np import matplotlib.pyplot as plt from matplotlib.pyplot import gcf x = np.linspace(0, 2*np.pi, 300) y = np.sin(x**2) plt.plot(x, y) plt.title("A little chirp") f = gcf() # let's keep the figure object around for later... from IPython.nbformat import current with open('01.1_IPythonIntro.ipynb') as f: nb = current.read(f, 'json') nb.worksheets[0].cells[0:5]