#------------------------------------------------------------------------------
#  FindAll.py
#------------------------------------------------------------------------------

def findAll(s, ch):
   """
   return a list consisting of all indices at which character ch is found in
   string s.  retun empty list if ch does not occur in s.
   """
   L = []
   i = 0
   while i < len(s):
      if s[i] == ch:
         L.append(i)
      i += 1
   return L


# function main() -------------------------------------------------------------
def main():

   t = 'Hello, World!'
   print( findAll(t, 'l') )
   print( findAll(t, 'q') )

# end main()

# closing conditional ---------------------------------------------------------
if __name__=='__main__':

   main()

# end
