<br><br><div class="gmail_quote">On Tue, Jan 12, 2010 at 1:16 AM, Alan Gauld <span dir="ltr">&lt;<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
&quot;vishwajeet singh&quot; &lt;<a href="mailto:dextrous85@gmail.com" target="_blank">dextrous85@gmail.com</a>&gt; wrote<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for your response but I am still not clear; can you show me the<br>
equivalent of [::-1]  in terms actually specifying start-index, end-index<br>
which gives me reverse of the given arrary.<br>
</blockquote>
<br></div>
I don&#39;t think you can, you must use the empty value.<br>
<br>
In theory you could use -1 except of course -1 refers to the &#39;e&#39;...<br>
<br>
Its a slight anomoly due to the use of negative indexing. You<br>
can do:<br>
<br>
&#39;abcde&#39;[0:5]<br>
<br>
and get the same as [0:]<br>
<br>
But you cannot put any valid value for x in<br>
<br>
&#39;abcde[4 : x :-1]<br>
<br>
that gets you the full string. You need to use [4::-1]<br>
<br>
HTH,<br><font color="#888888">
</font><br></blockquote><div><br>Thanks Alan and Micheal that surely cleard my doubts. <br></div></div><br clear="all"><br>-- <br>Vishwajeet Singh<br>+91-9657702154 | <a href="mailto:dextrous85@gmail.com">dextrous85@gmail.com</a> | <a href="http://singhvishwajeet.com">http://singhvishwajeet.com</a><br>
Twitter: <a href="http://twitter.com/vishwajeets">http://twitter.com/vishwajeets</a> | LinkedIn: <a href="http://www.linkedin.com/in/singhvishwajeet">http://www.linkedin.com/in/singhvishwajeet</a><br>