配列をforで初期化
sample = [x * 2 for x in range(5)]
print(sample)
[0, 2, 4, 6, 8]
sample = ['%s' for _ in range(5)]
print(sample)
['%s', '%s', '%s', '%s', '%s']
連想配列(dict)をforで初期化
sample = { x:False for x in range(5)}
print(sample)
{0: False, 1: False, 2: False, 3: False, 4: False}