#stringIndex.py
# demonstrate two ways of using the elements of a given sequence in order
# and at the same time keep track of the count

def byIndex():
    # list string index and string elements by looping through list *indices*
    s = raw_input("Enter a string: ")
    for i in range(len(s)):
        print i, s[i]  

def byElement():
    # list string index and string elements by looping through list *elements*
    s = raw_input("Enter a string: ")
    i = 0
    for char in s:
        print i, char
        i = i+1

byIndex()
print
byElement()
        
