From 968e52e6a7291a2a125243397bb25b26fffce4c7 Mon Sep 17 00:00:00 2001 From: Shantanu Choudhary Date: Wed, 25 Nov 2009 12:11:03 +0530 Subject: modifeid cheat sheets for session 3, 4 day 2. --- day2/cheatsheet1.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'day2/cheatsheet1.tex') diff --git a/day2/cheatsheet1.tex b/day2/cheatsheet1.tex index a0d100b..ca1f38a 100755 --- a/day2/cheatsheet1.tex +++ b/day2/cheatsheet1.tex @@ -74,7 +74,8 @@ Out[]: e In []: print w[-1] #last character of string Out[]: o \end{lstlisting} -\textbf{Note:} For a string variable, individual elements can be accessed using indices. +\textbf{Note:} For a string variable, individual elements can be accessed using indices.\\ +\textbf{Note:} All slicing and striding operations works with strings as well. \begin{lstlisting} In []: len(w) #function to calculate length of string Out[]: 5 -- cgit