From 499bc267d9c7dda6325b358b3248d156542113fc Mon Sep 17 00:00:00 2001 From: phxntxm Date: Wed, 13 Jul 2016 23:29:35 -0500 Subject: [PATCH] Testing a genexp in place of the for loop --- cogs/overwatch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cogs/overwatch.py b/cogs/overwatch.py index d98e897..4fc187b 100644 --- a/cogs/overwatch.py +++ b/cogs/overwatch.py @@ -59,8 +59,9 @@ class Overwatch: except KeyError: pass fmt += "\nTime Played: {}".format(g_stats['time_played']) - for i, r in data['hero_stats'].items(): - fmt += "\n{}: {}".format(i.replace("_", " ").title(), r) + fmt += "\n".join("{}: {}".format(i.replace("_", " ").title(), r) for i, r in data['hero_stats'].items()) + #for i, r in data['hero_stats'].items(): + #fmt += "\n{}: {}".format(i.replace("_", " ").title(), r) if hero == "": await self.bot.say("Overwatch stats for {}: ```py\n{}```".format(user.name, fmt)) else: