How can i convert a string in a python method? -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 10 उत्तर

    मुझे एक स्ट्रिंग मिली, के लिए उदाहरण "सहेजें" और मेरे पास पैरामीटर के साथ एक विधि बचा है I मैं कैसे तार को सहेजने के लिए कॉल में सहेज सकता हूं () मैंने eval और exec के साथ प्रयास किया।

    संपादित करें: यहां हल - & gt;

      def some_method (स्वयं): save_method = getattr (स्वयं, 'सहेजें') save_method ( ) # सेव ()    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -