summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNishanth Amuluru2010-10-12 10:53:33 +0530
committerNishanth Amuluru2010-10-12 10:53:33 +0530
commit6e7ee8c0ee453b36c50a707bb781df23c382458f (patch)
treeca9036c8645ad8cb4c66f3629a6e60c787892568
parent9cffa0a600ba51e9581a801bd05f3afe1ae9dc6f (diff)
downloadst-scripts-6e7ee8c0ee453b36c50a707bb781df23c382458f.tar.gz
st-scripts-6e7ee8c0ee453b36c50a707bb781df23c382458f.tar.bz2
st-scripts-6e7ee8c0ee453b36c50a707bb781df23c382458f.zip
Finished parsing_data
-rw-r--r--parsing_data/quickref.tex20
1 files changed, 12 insertions, 8 deletions
diff --git a/parsing_data/quickref.tex b/parsing_data/quickref.tex
index a0212b3..5adaa84 100644
--- a/parsing_data/quickref.tex
+++ b/parsing_data/quickref.tex
@@ -1,11 +1,15 @@
-Creating a tuple:\\
-{\ex \lstinline| t = (1, "hello", 2.5)|}
+Splitting a string on whitespace:\\
+{\ex \lstinline| str_var.split()|}
-Accessing elements of tuples:\\
-{\ex \lstinline| t[index] Ex: t[2]|}
+Splitting a string using a delimiter. Ex: ";" :\\
+{\ex \lstinline| str_var.split(";")|}
-Accessing slices of tuples:\\
-{\ex \lstinline| t[start:stop:step]|}
+Stripping the whitespace around a string:\\
+{\ex \lstinline| str_var.strip()|}
+
+Converting a string or float to int:\\
+{\ex \lstinline| int(var_name)|}
+
+Converting a string or int into float:\\
+{\ex \lstinline| float(var_name)|}
-Swapping values:\\
-{\ex \lstinline| a, b = b, a|}