Q:

Is there a way to make 'for' loop for function?

Is there a way to make a lot of functions , with just a little changes in them ?
Something like :
for i in ['a', 'b', 'c']:
   def i():
      if i=='a':
         print 'a'

I know code looks a little bit wild , but it how I see it in my head, is there any way to achieve it? Without making 3 separate functions ? Thank you

A:

def func(i):
    if i=='a':
        print 'a'

for i in ['a', 'b', 'c']:
    func(i)

Is this what you are looking for?

