Photo by James Harrison on Unsplash

How To Call a Python Function With A String?

Methodcaller, Get Attribute, Namespaces, and more

Louis Chan
Towards AI
Published in
4 min readJul 31, 2022

--

Welcome to a series of short posts, each with handy Python tricks that can help you up your game. In this blog, we will look into how to call a function by its name.

Situation

--

--

Learn from your own mistakes today makes you a better person tomorrow.