diff options
author | BonfaceKilz | 2021-04-23 17:32:35 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-04-23 17:42:26 +0300 |
commit | 8bad987466203baed948ba761d248e24f04ca49c (patch) | |
tree | 1f879a98d3ca7388728f7baf3eb6a00ce1273322 /wqflask | |
parent | 2114ad9e84ad7778e048b52cf865b5f031ceab88 (diff) | |
download | genenetwork2-8bad987466203baed948ba761d248e24f04ca49c.tar.gz |
Rewrite For Loop in a more Pythonic way
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/api/gen_menu.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py index 18afc5ad..eaddecd7 100644 --- a/wqflask/wqflask/api/gen_menu.py +++ b/wqflask/wqflask/api/gen_menu.py @@ -23,12 +23,7 @@ def get_species(): """Build species list""" results = g.db.execute( "SELECT Name, MenuName FROM Species ORDER BY OrderId").fetchall() - - species = [] - for result in results: - species.append([str(result[0]), str(result[1])]) - - return species + return [[name, menu_name] for name, menu_name in results] def get_groups(species): |