From 46cceab34beeef0a1d2588b54335e75aeeac63f8 Mon Sep 17 00:00:00 2001 From: Wannes-Sys Date: Tue, 20 Jun 2023 16:07:26 +0000 Subject: [PATCH] l[i:i+1] in (a, b) --- loops2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loops2.py b/loops2.py index 94ea507..11f7c30 100644 --- a/loops2.py +++ b/loops2.py @@ -1,5 +1,5 @@ l = [None] * 10 -[_ for i,_ in enumerate(temp) for l[i] in [i*5]] +[_ for i,_ in enumerate(l) for l[i] in [i*5]] print(l) # and now with dicts, cause it works too