#
#
#
#
#
a = range(20)
print "Our number sequence before truncation:", a
print " <command done>: <results of command>"
print
a.append(999)
print "a.append(999):", a
print
a.extend('test')
print "a.extend('test'):", a
print
a.insert(0, 11)
print "a.insert(0, 11):", a
print " - If you didn't notice what this did it inserted '11' into the"
print " - first array of our sequence a[0], so look for 11 at the beginning"
print " - look below for 2 other examples"
print
b = len(a)
a.insert(len(a), 11)
print "a.insert(len(a), 11):", a
print " - our sequence length is", len(a), "which placed 11 at the very end"
print " - of our string sequence: a[%s]" %(b)
print
b = len(a) / 2
a.insert(len(a) / 2, 11)
print "a.insert(len(a) / 2, 11):", a
print " - in this statement we took the total length of our string sequence"
print " -", len(a), "and divided it by 2 which placed 11 at a[%s]" %(b)
print
a.remove(11)
print "a.remove(11):", a
print " - This statement removed the first 11 in our string sequence, which"
print " - should have removed 11 from a[0], assuming you haven't edited this"
print " - example and a.insert(0, 11) is still stated above.."
print
b = len(a) / 2
a.pop(len(a) / 2)
print "a.pop(len(a) / 2):", a
print " - This statement removed 12 from our string sequence, also assuming"
print " - this example hasn't been edited.. If you look close at the last"
print " - example you will see 11, 11, 12 and 12 is at position: a[%s]" %(b)
print " - which is half the length of our string sequence:", len(a)
print
a.index(5)
print "a.index(5):", a
print
b = a.count(11)
print "b = a.count(11):", b
print " - this statement shows 11 being found %s times" %(b)
print
a.sort()
print "a.sort():", a
print " - self explanatory"
print
a.reverse()
print "a.reverse():", a
print " - also self explanatory"
print