additional_ipython/quickref.tex
changeset 301 af48ecb4dc11
parent 234 2b88724a7ee0
equal deleted inserted replaced
299:8d61625510b6 301:af48ecb4dc11
     1 Creating a tuple:\\
     1 accessing history:\\
     2 {\ex \lstinline|    t = (1, "hello", 2.5)|}
     2 {\ex \lstinline|    \%hist|}
     3 
     3 
     4 Accessing elements of tuples:\\
     4 accessing particular line of history:\\
     5 {\ex \lstinline|    t[index] Ex: t[2]|}
     5 {\ex \lstinline|    \%hist line_number|}
     6 
     6 
     7 Accessing slices of tuples:\\
     7 accessing particular range of history:\\
     8 {\ex \lstinline|    t[start:stop:step]|}
     8 {\ex \lstinline|    \%hist start_line stop_line|}
     9 
     9 
    10 Swapping values:\\
    10 saving history to a file:\\
    11 {\ex \lstinline|    a, b = b, a|}
    11 {\ex \lstinline|    \%save file_path line_numbers|}
       
    12 
       
    13 running a script:\\
       
    14 {\ex \lstinline|    \%run -i file_path|}
       
    15