#!/usr/bin/env python3
#=====================================================================================
# Python tuple (A tuple is similar to a list, except it is immutable) 
#=====================================================================================
print("Content-Type: text/html \n")     #http header with newline char (required for web)

stuff1 = ()                                                 #create an empty tuple
stuff2 = (1,2,3,4,5,6,7,8,9)
stuff3 = ('Sam','John','Steve', 1, 2, 3)                    #tuple elements can be multiple data types

print('<pre>')                                  #to print better on the web

print('Printing empty stuff1 tuple :', stuff1)
print()

print('Printing the entire stuff2 tuple ........:', stuff2)
print('Printing the first 2 elements of stuff2..:', stuff2[0], 'and', stuff2[1])
print('Printing the first 2 elements of stuff2..:', stuff2[0:2] )
print('Printing the number of elements in stuff2:', len(stuff2) )
print()

print('Printing the entire stuff3 tuple :', stuff3)
#stuff3[0] = 'Samuel'                                                #cannot change value of element
#stuff3.append(4)                                                    #cannot add new element to end of tuple
#stuff3.append('Bill')                                               #cannot add another element to end of tuple
#stuff3.insert(3,'Jack')                                             #cannot insert a new element 
#del stuff3[2]                                                       #cannot delete element
print('No changes can be performed .. :', stuff3)
print()