slicing strings in python
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/766141/reverse-a-string-in-python">reverse a string in Python</a>  </p>
</blockquote>



<p>I tried searching the python documentation for a certain slicing exapmle
lets say I have this string</p>

<pre><code>a = "ABCD"
</code></pre>

<p>when I write:</p>

<pre><code>a[::-1]
</code></pre>

<p>I get the reversed string</p>

<pre><code>"DCBA"
</code></pre>

<p>I can't understand how exectaly it works. None of the examples I saw were with two colons. what does it mean? how does it work? </p>

<p>thank you! </p>
