monthabbrev months[pos:pos+ print the result print("the month abbreviation is"monthabbrev "main(notice the last line of this program uses string concatenation to put period at the end of the month abbreviation here is sample of program outputenter month number ( - ) the month abbreviation is apr one weakness of the "string as lookup tableapproach used in this example is that it will only work when the substrings all have the same length (in this casethreesuppose we want to write program that outputs the complete month name for given number how could that be accomplished lists as sequences strictly speaking the operations in table are not really just string operations they are operations that apply to sequences as you know from the discussion in python lists are also kind of sequence that means we can also indexsliceand concatenate listsas the following session illustrates[ , [ , [ [ , ]* [ grades [' ',' ',' ',' ',' 'grades[ 'agrades[ : [' '' 'len(grades one of the nice things about lists is that they are more general than strings strings are always sequences of characterswhereas lists can be sequences of arbitrary objects you can create list of numbers or list of strings in factyou can even mix it up and create list that contains both numbers and stringsmylist [ "spam" " "