python - How can I convert list of dictionaries to list of lists? -


मेरे पास डेटा है

  डेटा = [['' नाम ':' a ', '' '1'}, {'नाम': 'बी', 'विवरण': '2'}]   

मैं ऊपर की तरह सूची की सूची में कनवर्ट करना चाहता हूं :

  डेटा = [['एक', '1'], ['बी', '2']]   

कृपया मुझे बताएं कि कैसे आप ऐसा कर सकते हैं

आप उपयोग कर सकते हैं, जैसे

  ऑपरेटर से डेटा में मद के लिए ([ए ',' 1 '], (' बी ',' 2 ')] <[(' 'नाम' ',' विवरण ' यदि आप सूचियों की सूची चाहते हैं, तो आप डेटा में आइटम के लिए  
  प्रिंट ([list (getter (item)) कर सकते हैं) # [[ 'ए', '1'], ['बी', '2']]    

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 -