There is a variable name in which the text is written, for example "n", how to call a variable whose name is the text in the variable name?

  • Is this a solution to some problem or just to know? - TEA
  • For the task, which I can not say - Kirill Nikiforov
  • See eval(...) - avp

1 answer 1

 def some_func(): print('hello') name = 'some_func' globals()[name]()