From 054ed1a86beff71899419fba6cba54c61536e417 Mon Sep 17 00:00:00 2001 From: Nishanth Amuluru Date: Mon, 11 Oct 2010 13:41:01 +0530 Subject: made the script writing_python_scripts into new form --- writing_python_scripts/quickref.tex | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 writing_python_scripts/quickref.tex (limited to 'writing_python_scripts/quickref.tex') diff --git a/writing_python_scripts/quickref.tex b/writing_python_scripts/quickref.tex new file mode 100644 index 0000000..a0212b3 --- /dev/null +++ b/writing_python_scripts/quickref.tex @@ -0,0 +1,11 @@ +Creating a tuple:\\ +{\ex \lstinline| t = (1, "hello", 2.5)|} + +Accessing elements of tuples:\\ +{\ex \lstinline| t[index] Ex: t[2]|} + +Accessing slices of tuples:\\ +{\ex \lstinline| t[start:stop:step]|} + +Swapping values:\\ +{\ex \lstinline| a, b = b, a|} -- cgit