print('===================================================================')
print('|  Sequential Container                                           |')
print('|  1.List                                                         |')
print('|  2.Tuple                                                        |')
print("===================================================================\n\n")

a = [1,2,3]
b = ['Tweedy', 1, 'SJ']
c = [1, 2, 'Hello', [3,5]]
d = []
print('01. List')
print('    1) List a is', a)
print('       List b is', b)
print('       List c is', c)
print('       List d is', d,end='\n\n')

a = list(range(1,21,3))
print('    2) Indexing & Slicing')
print('       List a   is', a)
print('       a[1]     is', a[1])
print('       a[-1]    is', a[-1])
print('       a[1:3]   is', a[1:3])
print('       a[3:-1]  is', a[3:-1],end='\n\n')

a = list(range(1,5))
b = list(range(6,10))
print('    3) Operation')
print('       List a  is', a)
print('       List b  is', b)
print('       a+b     is', a+b)
print('       a*2     is', a*2,end='\n\n')

lstA = list(range(1,5))
print('    4) Add & Delete')
print('       List lstA is', lstA)
lstA.append(10)
print('       lstA.append(10) is', lstA)
lstA.append(list(range(20,23)))
print('       lstA.append(list(range(10,13))) is', lstA)
lstA.insert(2,99)
print('       lstA.insert(2,99) is', lstA)
lstA.insert(1,list(range(77,99,11)))
print('       lstA.insert(1,list(range(77,99,11))) is', lstA)
lstA.clear()
print('       lstA.clear() is', lstA, end='\n\n')

a = (1,2,3)
b = ('Tweedy', 1, 'SJ')
c = (1, 2, 'Hello', [3,5])
d = (1, 2, 'Hello', (3,5))
e = ()
print('02. Tuple - Read Only')
print('    1) Tuple a is', a)
print('       Tuple b is', b)
print('       Tuple c is', c)
print('       Tuple d is', d)
print('       Tuple e is', e,end='\n\n')

a = tuple(range(1,21,3))
print('    2) Indexing & Slicing')
print('       Tuple a   is', a)
print('       a[1]     is', a[1])
print('       a[-1]    is', a[-1])
print('       a[1:3]   is', a[1:3])
print('       a[3:-1]  is', a[3:-1],end='\n\n')

a = tuple(range(1,5))
b = tuple(range(6,10))
print('    3) Operation')
print('       Tuple a  is', a)
print('       Tuple b  is', b)
print('       a+b     is', a+b)
print('       a*2     is', a*2,end='\n\n')

print('03. Unpacking')
a,b = (1,2)
x, *y, z = range(1,6)
print('    1) a,b = (1,2) -> a is %d and b is %d' % (a,b))
print('    2) x, *y, z = range(1,6) -> x is %d, y is %s and z is %d' % (x,y,z))
a,b,c,d = 'John'
x, *y, z = 'James Dean'
print('    3) a,b,c,d = "John" -> a is %c, b is %c, c is %c and d is %c' % (a,b,c,d))
print('    4) x, *y, z = "James Dean" -> x is %c, y is %s and z is %c' % (x,y,z))
