Q:

Inconsistent representation of tuples? 

Assume we've made the following assignment:
x = (1, 2, (3, 'John', 4), 'Hi')

Why does x[0:1] gives me (1,) but x[0:-1] gives (1, 2, (3, 'John', 4))?  Why is there no comma after (3, 'John', 4)? 

A:

When ever you are working on a tuple and there is a single element it ends with a comma like in your first case (1,).  As in the second case (1, 2, (3, 'John', 4)) there is more than one element, it does not end with a comma.