Python. How to call a function from a dictionary? : <p>I want to have a dictionary where a certain key calls a value... that value is a function and I would want that function to execute.
Below is my attempt to do it but all I get is the value of where it is stored in memory.</p>

<pre><code>class Testing:
    def __init__(self):
        self.method = {'Method1': self.another, 'Method2': self.there}

    def launch(self, input):
        print(self.method[input])

    @staticmethod
    def another():
        print('This print statement should pop out.')

    @staticmethod
    def there():
        print('This should not appear.')

new = Testing()
new.launch('Method1')
</code></pre>

<p>The result that I get from that is:</p>

<pre><code>&lt;function Testing.another at 0x01519540&gt;
</code></pre>

<p>Is there a way to do this?</p>
