title: Why the last value indexing in tuple or list give different class and slicing give different in python?
body: <p>For e.g.
  if</p>
  <pre><code>a=(1,[2,3])
  </code></pre>
  <p>Then indexing</p>
  <pre><code>b=a[1]
  </code></pre>
  <p>will give class <strong>list</strong> <em>(because index value is list)</em></p>
  <p><code>[2, 3] &lt;class 'list'&gt;</code></p>
  <p>but while slicing</p>
  <pre><code>c=a[1:]
  </code></pre>
  <p>give the class <strong>tuple</strong></p>
  <p><code>([2, 3],) &lt;class 'tuple'&gt;</code></p>
  <p>Can anyone explain why this is so?
  How does Python differentiate indexing from slicing in regards to determining class?</p>
  <p>Thank you in advance.</p>