diff --git a/src/PIL/ImagePalette.py b/src/PIL/ImagePalette.py index f33635a30f0..f9295e299bb 100644 --- a/src/PIL/ImagePalette.py +++ b/src/PIL/ImagePalette.py @@ -220,7 +220,7 @@ def negative(mode="RGB"): def random(mode="RGB"): from random import randint - palette = [randint(0, 255) for i in range(256 * len(mode))] + palette = [randint(0, 255) for _ in range(256 * len(mode))] return ImagePalette(mode, palette)