From eeb1aa3d0819921f7935dd73b307d69847ba779d Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 15 May 2020 01:15:19 +0200 Subject: Use enumerate(...) instead of range(len(...)) Signed-off-by: Olivier Gayot --- swiftstory/Game.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swiftstory/Game.py b/swiftstory/Game.py index ee1fd86..e80b7b2 100644 --- a/swiftstory/Game.py +++ b/swiftstory/Game.py @@ -14,8 +14,8 @@ class Game: self.white_desc = white_desc self.black_desc = black_desc - white_pick = [i for i in range(len(self.white_desc))] - black_pick = [i for i in range(len(self.black_desc))] + white_pick = [i for i, _ in enumerate(self.white_desc)] + black_pick = [i for i, _ in enumerate(self.black_desc)] self.state = self.WAITING_NEW_JUDGE -- cgit v1.2.3