How do I return a list as a variable in Python and use in Jinja2?

前端 未结 3 1674
盖世英雄少女心
盖世英雄少女心 2021-02-05 18:45

I am a very young programmer and I am trying to do something in Python but I\'m stuck. I have a list of users in Couchdb (using python couchdb library & Flask framework) who

3条回答
  •  太阳男子
    2021-02-05 19:21

    lista = [ x for x in db ] # watch out for big databases, you can run out of memory
    

提交回复
热议问题