q4[0]["choices"].append({"name": i}) a4 = prompt(q4, style=style) elif a3["option"] == "wishlisted apps": apps = db.get_wishlist(a1["userid"], True, False) apps = dict(apps) if apps == {}: puts(colored.red("You don't have any app in wishlisted apps!")) sys.exit() for i in apps.keys(): q4[0]["choices"].append({"name": i}) a4 = prompt(q4, style=style) elif a3["option"] == "trending apps": apps = db.trending(True, False) apps = dict(apps) for i in apps.keys(): q4[0]["choices"].append({"name": i}) a4 = prompt(q4, style=style) elif a3["option"] == "best rated apps": apps = db.best_rated(True, False) apps = dict(apps) for i in apps.keys(): q4[0]["choices"].append({"name": i}) a4 = prompt(q4, style=style) elif a3["option"] == "category wise apps": cats = db.get_category() for i in itertools.chain.from_iterable(cats):