input_output/quickref.tex
author Anoop Jacob Thomas<anoop@fossee.in>
Wed, 13 Oct 2010 14:00:33 +0530
changeset 319 e8c02b3c51ac
parent 236 33828497b5da
child 329 5c8e88276e1f
permissions -rw-r--r--
changed headers of scripts(objectives and prerequisites).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
236
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     1
Creating a tuple:\\
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     2
{\ex \lstinline|    t = (1, "hello", 2.5)|}
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     3
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     4
Accessing elements of tuples:\\
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     5
{\ex \lstinline|    t[index] Ex: t[2]|}
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     6
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     7
Accessing slices of tuples:\\
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     8
{\ex \lstinline|    t[start:stop:step]|}
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     9
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
    10
Swapping values:\\
33828497b5da Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
    11
{\ex \lstinline|    a, b = b, a|}