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

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

sql server ce - Is there some way to make sqlce3.5 and 4.0 co-exist in the C# project -