l[i:i+1] in (a, b)
This commit is contained in:
parent
3fa1399880
commit
ecac93a02b
|
@ -2,6 +2,9 @@ l = [None] * 10
|
||||||
[_ for i,_ in enumerate(temp) for l[i] in [i*5]]
|
[_ for i,_ in enumerate(temp) for l[i] in [i*5]]
|
||||||
print(l)
|
print(l)
|
||||||
|
|
||||||
|
# and now with dicts, cause it works too
|
||||||
d = {i:i for i in range(10)}
|
d = {i:i for i in range(10)}
|
||||||
[_ for i,_ in enumerate(d) for d[i] in [i*5]]
|
[_ for i,_ in enumerate(d) for d[i] in [i*5]]
|
||||||
print(d)
|
print(d)
|
||||||
|
|
||||||
|
# sadly sets won't let me :'(
|
Loading…
Reference in New Issue