F=[
"▢","█","█","█","▢","█","█","█",
"▢","█","█","█","▢","█","▢","█",
"█","█","█","▢","█","█","█","▢",
"█","█","█","▢","█","▢","█","▢",
"▢","█","█","█","▢","█","█","█",
"▢","█","█","█","▢","█","▢","█",
"█","█","█","▢","█","█","█","▢",
"█","█","█","▢","█","▢","█","▢",
"▢","█","█","█","▢","█","█","█",
"▢","█","█","█","▢","█","▢","█",
"█","█","█","▢","█","█","█","▢",
"█","█","█","▢","█","▢","█","▢",
"▢","█","█","█","▢","█","█","█",
"▢","█","█","█","▢","█","▢","█",
"█","█","█","▢","█","█","█","▢",
"█","█","█","▢","█","▢","█","▢",
]
print(f'{F}:初期値')
for i in range(120):
for j in range(len(F)-1):
if F[j-1] == F[j+1] :
F[j] = "▢"
else:
F[j] = "█"
print(f'{F}:世代{i}')
To embed this project on your website, copy the following code and paste it into your website's HTML: