1
0
Fork 0
mirror of synced 2024-05-19 12:02:29 +12:00

Testing a genexp in place of the for loop

This commit is contained in:
phxntxm 2016-07-13 23:29:35 -05:00
parent 13c2d479c5
commit 499bc267d9

View file

@ -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: