| author | Puneeth Chaganti <punchagan@fossee.in> |
| Wed, 13 Oct 2010 11:13:01 +0530 | |
| changeset 313 | b9b7bfce773e |
| parent 255 | 75fd106303dc |
| child 332 | b702c10e5919 |
| permissions | -rw-r--r-- |
|
255
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
1 |
Creating a tuple:\\ |
|
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
2 |
{\ex \lstinline| t = (1, "hello", 2.5)|}
|
|
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
3 |
|
|
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
4 |
Accessing elements of tuples:\\ |
|
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
5 |
{\ex \lstinline| t[index] Ex: t[2]|}
|
|
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
6 |
|
|
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
7 |
Accessing slices of tuples:\\ |
|
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
8 |
{\ex \lstinline| t[start:stop:step]|}
|
|
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
9 |
|
|
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
10 |
Swapping values:\\ |
|
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
11 |
{\ex \lstinline| a, b = b, a|}
|