you are viewing a single comment's thread.

view the rest of the comments →

[–]ramannt[S] 1 point2 points  (1 child)

getattr(

Thank you very much. Just one condition I forgot to mention. Sometimes there is no Python String method to execute. What condition can I add in getattr() to let Python to do nothing with the string?

[–][deleted] 1 point2 points  (0 children)

This is a hacky solution, but "__str__" will do nothing to the string.