I have a a function that takes as input 2 strings and a tuple of points. Based on the combination of those two strings, a specific function should be called on the tuple. I know that I could program some nested if statements, but I'm interested in the idea of calling an existing function from a string.

For example, I have a conversion function 'foo2bar(points)' which converts 'foo' points to 'bar' points. I have many other types of points and conversions between them. I now want to implement a 'type2type(points, oldtype, newtype)' which takes strings oldtype and newtype, and baed on those strings should call the appropriate conversion.

If I call type2type(points, 'foo','bar'), I want it to result in calling foo2bar(points).

Is there a way to generate function calls by concatenating strings like that? I want to say something like `functionName = oldtype + '2' + newtype` and then call 'functionName somehow.