title: Using getattr function on self in python
body: <p>I am trying to write call multiple functions through a loop using the <code>getattr(...)</code>. Snippet below:</p>
  
  <pre><code>class cl1(module):
       I =1
       Name= 'name'+str(I)
       Func= 'func'+str(I)
       Namecall = gettattr(self,name)
       Namecall = getattr(self,name)()
  </code></pre>
  
  <p>This is when get the following code: <code>self.name1 = self.func1()</code></p>
  
  <p>The desire is to loop multiple of these but the code is not working. Can you please advise?</p>